Skip to content

Latest commit

 

History

839 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. Problem Solving.
  1. Math. Complexity. O-notation.
  1. Logic and Bits.
  1. Data Structures Overview
  1. Recursion.
  1. Linear Algorithms on Arrays 1
  1. Linear Algorithms on Arrays 2
  1. Monotonic Stack
  1. Binary Tree.

5.5. Backtracking

  • Lecture Notes in Colab (in progress)
  1. Stack. Queue. Deque.
  1. Sorting: Simple Sorting Algorithms, Stability.
  1. Sorting: Merge Sort and Quick Sort.
  1. Heap. Heap Sort. Priority Queue.
  1. Divide and Conquer. Binary Search.
  1. Search Tree. Balancing.
  1. Strings.
  1. Introduction to Graphs. BFS. DFS.
  1. Dynamic Programming
  1. Hash Maps.

Cool Separate Lectures

Methodological Notes

Instructions

Additional

visualisations

Experimental

different tests

Problems Classified

Common Sense
# Problem # Problem # Problem # Problem # Problem
1. Ugly Number 2. Reverse Integer 3. Palindrome Number 4. Pow(x, n) 5. Water and Jug Problem
6. Nth Digit 7. Random Pick with Weight 8. Bulb Switcher 9. Bulb Switcher II 10.
Arrays. Running Sum
# Problem # Problem # Problem # Problem # Problem
1. Minimum Value to Get Positive Step by Step Sum 2. Best Time to Buy and Sell Stock II 3. Range Addition II 4. Product of Array Except Self 5. N-Repeated Element in Size 2N Array
6. Majority Element 7. Rotate Image 8. Find the Duplicate Number 9. Partition Array into Disjoint Intervals 10. Valid Mountain Array
11. Defuse the Bomb 12. Most Visited Sector in a Circular Track 13. Next Permutation 14. Permutations II 15. Monotone Increasing Digits
16. Increasing Triplet Subsequence 17. Longest Substring with At Least K Repeating Characters 18. 19. 20.
Arrays. Two Pointers.
# Problem # Problem # Problem # Problem # Problem
1. Arithmetic Slices 2. Detect Pattern of Length M Repeated K or More Times 3. Longest Continuous Increasing Subsequence 4. Trapping Rain Water 5. Maximum Distance Between a Pair of Values
6. Replace the Substring for Balanced String 7. Sort Colors 8. Number of Substrings With Only 1s 9. Maximum Distance Between a Pair of Values 10. Longest Substring Without Repeating Characters
11. Minimum Size Subarray Sum 12. Rotate Array 13. Reverse String 14. Sort Array By Parity 15. Move Zeroes
16. Sum of Square Numbers 17. Permutation in String 18. Shortest Subarray to be Removed to Make Array Sorted 19. 20.
Lists. Difference Between Iterative and Recursive Approaches.
# Problem # Problem # Problem # Problem # Problem
1. Delete Node in a Linked List 2. Linked List Cycle 3. Intersection of Two Linked Lists 4. Palindrome Linked List 5. Reverse Linked List
6. Odd Even Linked List 7. Remove Duplicates from Sorted List II 8. Merge In Between Linked Lists 9. Reverse Linked List II 10. Split Linked List in Parts
11. Swap Nodes in Pairs 12. Design Linked List 13. 14. 15.
Logic and Bits
# Problem # Problem # Problem # Problem # Problem
1. Single Number 2. Power of Two 3. Number of 1 Bits 4. Determine Color of a Chessboard Square 5. Power of Three
6. Power of Four 7. Adding Two Negabinary Numbers 8. Find Elements in a Contaminated Binary Tree 9. Gray Code 10. Circular Permutation in Binary Representation
11. Elimination Game 12. 13. 14. 15.
Binary Tree
# Problem # Problem # Problem # Problem # Problem
1. Diameter of Binary Tree 2. Sum Root to Leaf Numbers 3. Sum of Left Leaves 4. Maximum Depth of Binary Tree 5. Minimum Depth of Binary Tree
6. Binary Tree Tilt 7. Invert Binary Tree 8. Univalued Binary Tree 9. Same Tree 10. Symmetric Tree
11. Path In Zigzag Labelled Binary Tree 12. Find a Corresponding Node of a Binary Tree in a Clone of That Tree 13. Minimum Time to Collect All Apples in a Tree 14. The k-th Lexicographical String of All Happy Strings of Length n 15.
Backtracking
# Problem # Problem # Problem # Problem # Problem
1. Combinations 2. Combination Sum 3. Combination Sum II 4. Combination Sum III 5. Fair Distribution of Cookies
6. Palindrome Partitioning 7. 8. 9. 10.
11. 12. 13. 14. 15.
Stack. Queue. Deque.
# Problem # Problem # Problem # Problem # Problem
1. Remove All Adjacent Duplicates in String II 2. Binary Tree Inorder Traversal 3. Valid Parentheses 4. Implement Stack using Queues 5. Implement Queue using Stacks
6. Next Greater Element II 7. Maximum Width Ramp 8. Find the Most Competitive Subsequence 9. Evaluate Reverse Polish Notation 10. Asteroid Collision
11. Next Greater Node In Linked List 12. Minimum Number of Swaps to Make the String Balanced 13. Removing Stars From a String 14. Remove K Digits 15.
Sorting: Simple Sorting Algorithms, Stability.
# Problem # Problem # Problem # Problem # Problem
1. Insertion Sort List 2. How Many Numbers Are Smaller Than the Current Number 3. Sort Colors 4. Custom Sort String 5. Sort Array By Parity
6. Two City Scheduling 7. Partition List 8. Queue Reconstruction by Height 9. Sort List 10. Find Closest Number to Zero
11. Largest Number 12. 13. 14. 15.
Sorting: Merge Sort and Quick Sort.
# Problem # Problem # Problem # Problem # Problem
1. Insertion Sort List 2. How Many Numbers Are Smaller Than the Current Number 3. Sort Colors 4. Custom Sort String 5. Sort Array By Parity
6. Two City Scheduling 7. Partition List 8. Partition Array According to Given Pivot 9. 10.
Heap. Heap Sort. Priority Queue.
# Problem # Problem # Problem # Problem # Problem
1. Remove Stones to Minimize the Total 2. Seat Reservation Manager 3. Find Median from Data Stream 4. Furthest Building You Can Reach 5. Total Cost to Hire K Workers
6. 7. 8. 9. 10.
11. 12. 13. 14. 15.
Divide and Conquer. Binary Search.
# Problem # Problem # Problem # Problem # Problem
1. Beautiful Array 2. Count Complete Tree Nodes 3. Median of Two Sorted Arrays 4. Search in Rotated Sorted Array 5. Two Sum
6. Single Element in a Sorted Array 7. Peak Index in a Mountain Array 8. Find Peak Element 9. Find Minimum in Rotated Sorted Array 10. Minimum Limit of Balls in a Bag
11. Sqrt(x) 12. Koko Eating Bananas 13. Capacity To Ship Packages Within D Days 14. Maximum Subarray 15. Maximum Value at a Given Index in a Bounded Array
Search Tree. Balancing.
# Problem # Problem # Problem # Problem # Problem
1. Search in a Binary Search Tree 2. Lowest Common Ancestor of a Binary Search Tree 3. Trim a Binary Search Tree 4. Range Sum of BST 5. Insert into a Binary Search Tree
6. Balance a Binary Search Tree 7. Increasing Order Search Tree 8. Minimum Distance Between BST Nodes 9. Kth Smallest Element in a BST 10. Convert Sorted Array to Binary Search Tree
11. Validate Binary Search Tree 12. 13. 14. 15.
Strings.
# Problem # Problem # Problem # Problem # Problem
1. Remove All Occurrences of a Substring 2. Reverse String 3. Reverse String II 4. Reverse Vowels of a String 5. Maximum Nesting Depth of the Parentheses
6. 1-bit and 2-bit Characters 7. Maximum Score After Splitting a String 8. Long Pressed Name 9. Is Subsequence 10. Add Strings
11. Ransom Note 12. Maximum Number of Balloons 13. Largest Substring Between Two Equal Characters 14. Consecutive Characters 15. Count and Say
16. Shortest Distance to a Character 17. 18. 19. 20.
Introduction to Graphs. BFS. DFS.
# Problem # Problem # Problem # Problem # Problem
1. All Nodes Distance K in Binary Tree 2. Distribute Coins in Binary Tree 3. Minimum Number of Vertices to Reach All Nodes 4. Shortest Path in Binary Matrix 5. Open the Lock
6. Number of Closed Islands 7. Number of Enclaves 8. Clone Graph 9. 10.
11. 12. 13. 14. 15.
Dynamic Programming
# Problem # Problem # Problem # Problem # Problem
1. Is Subsequence 2. Partition Array for Maximum Sum 3. Count Square Submatrices with All Ones 4. Flip String to Monotone Increasing 5. Minimum Deletions to Make String Balanced
6. House Robber 7. Count Sorted Vowel Strings 8. Unique Binary Search Trees 9. Unique Paths 10. Climbing Stairs
11. Best Time to Buy and Sell Stock 12. Min Cost Climbing Stairs 13. Egg Drop With 2 Eggs and N Floors 14. Longest Increasing Subsequence 15. Longest Common Subsequence
16. 01 Matrix 17. Count Number of Maximum Bitwise-OR Subsets 18. Number of Ways to Select Buildings 19. Maximize Win From Two Segments 20. Check if There is a Valid Partition For The Array
21. Maximum Subarray Sum with One Deletion 22. Maximum Subarray 23. Maximum Sum Circular Subarray 24. Delete and Earn 25. Visit Array Positions to Maximize Score
26. Find Two Non-overlapping Sub-arrays Each With Target Sum 27. First Day Where You Have Been in All the Rooms 28. Longest Palindromic Subsequence 29. 30.
Hash Maps
# Problem # Problem # Problem # Problem # Problem
1. Design HashMap 2. LRU Cache 3. Top K Frequent Elements 4. Number of Good Pairs 5. Maximum Erasure Value
6. Apply Discount Every n Orders 7. Longest Arithmetic Subsequence of Given Difference 8. Count Nice Pairs in an Array 9. Restore the Array From Adjacent Pairs 10. Remove Zero Sum Consecutive Nodes from Linked List
11. Count Number of Pairs With Absolute Difference K 12. Number of Pairs of Interchangeable Rectangles 13. Check if All Characters Have Equal Number of Occurrences 14. 15.
Union-Find
# Problem # Problem # Problem # Problem # Problem
1. Redundant Connection 2. 3. 4. 5.
6. 7. 8. 9. 10.
11. 12. 13. 14. 15.

For Future Extension

. Fenwick Tree (Binary Index Tree).

. Combinatorial Problems.

. FFT.

. Union-Find

. Arrays

. Lists. Difference Between Iterative and Recursive Approaches.

About

No description, website, or topics provided.

Resources

Stars

7 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages