Find the Lowest Common Ancestor (LCA) in a Binary Tree
Check if a binary tree is a balanced BST
Add two numbers represented as linked lists
Find all Stepping Numbers within a given range
Write code to evaluate an arithmetic expression
Find the longest palindromic substring in a given string.
Find the next greater element for every element in an array
Find the number of unique paths in a 2D grid with obstacles.
Search an element in a row-wise and column-wise sorted matrix
Given a string, print all subsets (subsequences) of the string
Print all the nodes visible from the top view of a binary tree.
Find all unique triplets in an array such that their sum is zero
Construct a binary tree from preorder and inorder traversal arrays
Find the total number of possible Binary Search Trees for a given N
Count the number of binary strings of length N without consecutive 1s.
Given an infinite stream of numbers, find the median at each insertion
Design a stack that supports getMin() in O(1) time and O(1) extra space
Find an element in a sorted array that has been rotated any number of times
Stock Buy Sell to Maximize Profit (maximize profit over given stock prices)
Find the row with the maximum number of 1s in a row-wise sorted binary matrix
Count the minimum number of fountains to be activated to cover the entire garden
Rotate a given square matrix by 90 degrees clockwise and print the resulting matrix.
Given a string containing '(', ')' and '*', check if it is a valid parenthesis string
Given an array representing elevation map, compute how much rain water can be trapped
Given a sorted array, count the frequency of all distinct numbers in less than O(n) time.
Given gas and cost arrays, determine if you can complete the circuit and return the starting index
Given an array, print all possible contiguous subarrays whose sum is divisible by a given number x.
Given a sorted array where every element is repeated except one, find the non-repeated element in O(log n) time
Given an infinite stream of integers arriving in a sorted manner, check if a given number is present in the stream
Given two sequences, find the maximum number of bridges that can be built without crossing (Building Bridges problem).
Given packet sizes of 6, 9, and 20 pens, determine whether a given number N of pens can be sold if only full packets can be sold.
Given N lines defined by (x1, x2) intervals, find the point where the maximum number of lines intersect when drawing a vertical line.
Given ratings of programmers, pair them such that the sum of absolute differences in ratings (bias amount) across all pairs is minimized.
Design and implement an LRU (Least Recently Used) Cache, discussing suitable data structures and time complexities for different operations.