Complete-Preparation

πŸŽ‰ One-stop destination for all your technical interview Preparation πŸŽ‰

View the Project on GitHub

Leetcode Problem 700-799

700. Search in a Binary Search Tree 🌟

O(N) Time, Recursive solution

O(N) Time, Iterative solution


701. Insert into a Binary Search Tree 🌟🌟

O(N) Time solution


704. Binary Search 🌟

O(log N) Time algorithm


705. Design HashSet 🌟

Solution

Linked list + Chaining solution


706. Design HashMap 🌟

Array implementation

With the hashing function


721. Accounts Merge 🌟🌟

DFS Solution

Union-find (DSU)

MUST READ:


733. Flood Fill 🌟

DFS - Recursive

BFS - Iterative

MUST READS:


739. Daily Temperatures 🌟🌟

Brute Force

Stack Solution


740. Delete and Earn 🌟🌟

House robber - DP

Space optimization DP


746. Min Cost Climbing Stairs 🌟

Recursive Solution (TLE)

Memoization (Top-Down) (3ms-AC)

Tabulation (Bottom-Up) (7ms-AC)

Reduced space complexity


784. Letter Case Permutation 🌟🌟

Backtracking


790. Domino and Tromino Tiling 🌟🌟


792. Number of Matching Subsequences 🌟🌟

Brute Force (TLE)

Optimization (TLE)

Hashmap (AC)


797. All Paths From Source to Target 🌟🌟

BFS

This process can be implemented using a BFS traversal as -

DFS - Backtracking

The process of finding all paths using DFS can be implemented as -


799. Champagne Tower 🌟🌟

Simulation