Tag: Google
-
DSA SheetSerialize and Deserialize a Binary Tree
Given the root of a binary tree, create two functions: serialize(root) – Converts the binary tree into a string representation….
January 1, 2025
-
DSA SheetImplement an XOR Linked List
An XOR-linked list is a memory-efficient version of a doubly linked list. Instead of each node storing separate next and…
January 4, 2025
-
DSA SheetCount Unival Subtrees in a Binary Tree
A unival tree (short for "universal value tree") is a tree in which all nodes have the same value. Given…
January 6, 2025
-
DSA SheetEstimate π Using Monte Carlo Method
The formula for the area of a circle is given by πr². Use the Monte Carlo method to approximate the…
January 17, 2025
-
DSA SheetLongest Absolute Path in File System Representation
Find the length of the longest absolute path to a file within the abstracted file system. The length is measured…
February 19, 2025
-
DSA BasicsFind Intersection of Two Singly Linked Lists
You are given two singly linked lists that intersect at some node. Your task is to find and return the…
March 11, 2025