Skip to content

Latest commit

Β 

History

History
934 lines (931 loc) Β· 54 KB

readme.md

File metadata and controls

934 lines (931 loc) Β· 54 KB

Data Structure & Algorithm

Please feel free to look up problem solutions or build your own code journal using this format

## Problems
β”œβ”€β”€ a. Bits
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Counting - Closest int with same bit count.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Counting - Count Bits.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Operation - Add.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Operation - Convert Base.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Operation - Divide.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Operation - Multiply.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Operation - Power.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Operation - Random Number.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Masking - Gray Code.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Masking - Reverse bits.py
β”‚Β Β  β”‚Β Β  └── c. Masking - Swap Bits.py
β”‚Β Β  β”œβ”€β”€ a. Counting - Hamming Distance.py
β”‚Β Β  β”œβ”€β”€ a. Counting - Number of Excellent Pairs.py
β”‚Β Β  β”œβ”€β”€ b. Operation - Design BItset.py
β”‚Β Β  β”œβ”€β”€ b. Operation - Integer Replacement.py
β”‚Β Β  β”œβ”€β”€ c. Masking - Count Words Obtained After Adding a Letter.py
β”‚Β Β  └── c. Masking - Search Duplicate and Missing.py
β”œβ”€β”€ b. Strings & Hash
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Palindrome - Can Form Palindrome.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Palindrome - Manacher - Longest Palindromic Substring.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Palindrome - Manacher's Algorithm - Longest Palindrome.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Encrypt - Run Length Encoding.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Encrypt - String Hash.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Best Substring - Find All Subset Combination in String.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Best Substring - Find Length of Longest Contained Interval.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Best Substring - Find Longest Subarray with Distinct Entries.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Best Substring - Find Smallest Subarray Covering All Values.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Best Substring - Find Smallest Subarray Sequentially Covering All Values.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. String Mutation - Levenshtein Distance.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. String Mutation - Replace Word in String.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. String Match - Find Anagrams.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. String Match - KMP - Implementation (Algo).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. String Match - KMP - Implementation (G4G).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. String Match - Rabin Karp - Implementation (CTCI).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. String Match - Rabin Karp - Implementation (G4G).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. String Match - Ransom Note.py
β”‚Β Β  β”‚Β Β  └── f. Hash - Find Nearest Repeated String in Array.py
β”‚Β Β  β”œβ”€β”€ 1_Count_and_Say.cpp
β”‚Β Β  β”œβ”€β”€ 1_First_Unique_Character_in_a_String.cpp
β”‚Β Β  β”œβ”€β”€ 1_Implement_strStr().cpp
β”‚Β Β  β”œβ”€β”€ 1_Keyboard_Row.cpp
β”‚Β Β  β”œβ”€β”€ 1_License_Key_Formatting.cpp
β”‚Β Β  β”œβ”€β”€ 1_Longest_Common_Prefix.cpp
β”‚Β Β  β”œβ”€β”€ 1_Repeated_String_Match.cpp
β”‚Β Β  β”œβ”€β”€ 1_Reverse_String.cpp
β”‚Β Β  β”œβ”€β”€ 1_Reverse_Vowels_of_a_String.cpp
β”‚Β Β  β”œβ”€β”€ 1_Reverse_Words_in_a_String.cpp
β”‚Β Β  β”œβ”€β”€ 1_Reverse_Words_in_a_String_III.cpp
β”‚Β Β  β”œβ”€β”€ 1_String_to_Integer_(atoi).cpp
β”‚Β Β  β”œβ”€β”€ 2_Add_Bold_Tag_in_String.cpp
β”‚Β Β  β”œβ”€β”€ 2_Group_Anagrams.cpp
β”‚Β Β  β”œβ”€β”€ 2_Longest_Palindromic_Substring.cpp
β”‚Β Β  β”œβ”€β”€ 2_Longest_Substring_Without_Repeating_Characters.cpp
β”‚Β Β  β”œβ”€β”€ 2_Maximum_Product_of_Word_Lengths.cpp
β”‚Β Β  β”œβ”€β”€ 2_Next_Closest_Time.cpp
β”‚Β Β  β”œβ”€β”€ 2_One_Edit_Distance.cpp
β”‚Β Β  β”œβ”€β”€ 2_Short_Encoding_of_Words.cpp
β”‚Β Β  β”œβ”€β”€ 3_Regular_Expression_Matching.cpp
β”‚Β Β  β”œβ”€β”€ 3_Word_Break2.cpp
β”‚Β Β  β”œβ”€β”€ a. Find the Closest Palindrome.py
β”‚Β Β  β”œβ”€β”€ a. Palindrome - Longest Palindrome by Concatenating Two Letter Words.py
β”‚Β Β  β”œβ”€β”€ a. Palindrome - Manacher - Palindrome Substrings.py
β”‚Β Β  β”œβ”€β”€ a. Palindrome - Palindrome Pairs.py
β”‚Β Β  β”œβ”€β”€ a. Palindrome - Shortest Palindrome.py
β”‚Β Β  β”œβ”€β”€ a. Palindrome - Strobogrammatic Number III.py
β”‚Β Β  β”œβ”€β”€ a. Palindrome - Strobogrammatic Number.py
β”‚Β Β  β”œβ”€β”€ b. Encrypt - Encode String with Shortest Length.py
β”‚Β Β  β”œβ”€β”€ b. Encrypt - Excel Sheet Column Number.py
β”‚Β Β  β”œβ”€β”€ b. Encrypt - Hash - Isomorphic Strings.py
β”‚Β Β  β”œβ”€β”€ b. Encrypt - Int to Roman.py
β”‚Β Β  β”œβ”€β”€ b. Encrypt - Roman to Int.py
β”‚Β Β  β”œβ”€β”€ b. Encrypt - Strong Password Checker.py
β”‚Β Β  β”œβ”€β”€ b. Hash - Bulls and Cows.py
β”‚Β Β  β”œβ”€β”€ b. Hash - Naming a Company.py
β”‚Β Β  β”œβ”€β”€ b. Hash - Shortest Word Distance III.py
β”‚Β Β  β”œβ”€β”€ b. Hash - String Transforms Into Another String.py
β”‚Β Β  β”œβ”€β”€ b. Hash - Substring with Concatenation of All Words.py
β”‚Β Β  β”œβ”€β”€ c. Best Substring - Longest Balanced Substring (Algo).py
β”‚Β Β  β”œβ”€β”€ c. Best Substring - Longest Binary Subsequence Less than or Equal to K.py
β”‚Β Β  β”œβ”€β”€ c. Best Substring - Smallest Substring Containing (Algo).py
β”‚Β Β  β”œβ”€β”€ c. String Mutation - Split Concatenated Strings.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Change Minimum Characters to Satisfy One of Three Conditions.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Duplicate Zeros.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Find and Replace in String.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Levenshtein - Edit Distance.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Rearrange String K Distance Apart.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Swap Adjacent in LR String.py
β”‚Β Β  β”œβ”€β”€ d. String Mutation - Text Justification.py
β”‚Β Β  β”œβ”€β”€ e. Search - Backspace String Compare.py
β”‚Β Β  β”œβ”€β”€ e. Search - Rabin-Karp - Repeated DNA Sequences.py
β”‚Β Β  β”œβ”€β”€ e. String Match - Rabin-Karp - String Differ by One Character.py
β”‚Β Β  β”œβ”€β”€ e. String Match - Subsequence - Number of Matching Subsequences.py
β”‚Β Β  β”œβ”€β”€ f. String Fitting - Sentence Screen Fitting.py
β”‚Β Β  └── f. String Fitting - Shortest Way to Form String.py
β”œβ”€β”€ c. Array
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 1 - Sum - List Multiply.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 1 - Sum - List Plus One.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Alternate Small and Large.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Can Jump To End.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariants - 3 Sum to Target.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariants - Largest Rectangle Under Skyline.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariants - Majority Element.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariants - Travel Gas Problem.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariants - Water Trap Problem.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. 2D - Matrix - Rotate Matrix.py
β”‚Β Β  β”‚Β Β  └── b. 2D - Simulation - Spiral Ordering of 2D Array.py
β”‚Β Β  β”œβ”€β”€ 1_Island_Perimeter.cpp
β”‚Β Β  β”œβ”€β”€ 1_K_Weakest_Rows_in_Matrix.cpp
β”‚Β Β  β”œβ”€β”€ 1_Letter_Case_Permutation.cpp
β”‚Β Β  β”œβ”€β”€ 1_Plus_One.cpp
β”‚Β Β  β”œβ”€β”€ 1_Remove_Duplicates_From_Sorted_Array.cpp
β”‚Β Β  β”œβ”€β”€ 1_Reverse_Bits.cpp
β”‚Β Β  β”œβ”€β”€ 1_Rotate_Array.cpp
β”‚Β Β  β”œβ”€β”€ 1_Single_Number.cpp
β”‚Β Β  β”œβ”€β”€ 1_Two_Sum.cpp
β”‚Β Β  β”œβ”€β”€ 1_Valid_Parentheses.cpp
β”‚Β Β  β”œβ”€β”€ 1_Valid_Sudoku.cpp
β”‚Β Β  β”œβ”€β”€ 1_shiftGrid.cpp
β”‚Β Β  β”œβ”€β”€ 2_3Sum.cpp
β”‚Β Β  β”œβ”€β”€ 2_3Sum_Closest.cpp
β”‚Β Β  β”œβ”€β”€ 2_Battleships_in_a_Board.cpp
β”‚Β Β  β”œβ”€β”€ 2_Compare_Strings_by_Smallest_Char_Freq.cpp
β”‚Β Β  β”œβ”€β”€ 2_Count_Submatrices_With_All_Ones.py
β”‚Β Β  β”œβ”€β”€ 2_Counting_Bits.cpp
β”‚Β Β  β”œβ”€β”€ 2_Find_Minimum_in_Rotated_Sorted_Array.cpp
β”‚Β Β  β”œβ”€β”€ 2_Increasing_Triplet_Subsequence.cpp
β”‚Β Β  β”œβ”€β”€ 2_K_Empty_Slots.cpp
β”‚Β Β  β”œβ”€β”€ 2_Majority_Element.cpp
β”‚Β Β  β”œβ”€β”€ 2_Max_Consecutive_Ones_II.cpp
β”‚Β Β  β”œβ”€β”€ 2_Max_Number_of_Eaten_Apples.py
β”‚Β Β  β”œβ”€β”€ 2_Missing_Ranges.cpp
β”‚Β Β  β”œβ”€β”€ 2_Rectangle_Area.cpp
β”‚Β Β  β”œβ”€β”€ 2_Set_Matrix_Zeroes.cpp
β”‚Β Β  β”œβ”€β”€ 2_Single_Number_II.cpp
β”‚Β Β  β”œβ”€β”€ 2_Sum_of_Two_Integers.cpp
β”‚Β Β  β”œβ”€β”€ 2_Task_Scheduler.cpp
β”‚Β Β  β”œβ”€β”€ 3_4Sum.cpp
β”‚Β Β  β”œβ”€β”€ 3_4Sum_II.cpp
β”‚Β Β  β”œβ”€β”€ 3_Basic_Calculator_II.cpp
β”‚Β Β  β”œβ”€β”€ 3_Container_With_Most_Water.cpp
β”‚Β Β  β”œβ”€β”€ 3_Contains_Duplicate_III.cpp
β”‚Β Β  β”œβ”€β”€ 3_Find_the_Duplicate_Number.cpp
β”‚Β Β  β”œβ”€β”€ 3_First_Missing_Positive.cpp
β”‚Β Β  β”œβ”€β”€ 3_Game_of_Life.cpp
β”‚Β Β  β”œβ”€β”€ 3_Largest_Rectangle_in_Histogram.cpp
β”‚Β Β  β”œβ”€β”€ 3_Largest_Rectangle_in_Histogram.py
β”‚Β Β  β”œβ”€β”€ 3_Longest_Consecutive_Sequence.cpp
β”‚Β Β  β”œβ”€β”€ 3_Longest_Substring_with_At_Most_K_Distinct_Characters.cpp
β”‚Β Β  β”œβ”€β”€ 3_Maximal_Rectangle.py
β”‚Β Β  β”œβ”€β”€ 3_Minimum_Window_Substring.cpp
β”‚Β Β  β”œβ”€β”€ 3_Product_of_Array_Except_Self.cpp
β”‚Β Β  β”œβ”€β”€ 3_Sliding_Window_Maximum.cpp
β”‚Β Β  β”œβ”€β”€ 3_Sliding_Window_Maximum.py
β”‚Β Β  β”œβ”€β”€ 3_Spiral_Matrix.cpp
β”‚Β Β  β”œβ”€β”€ 3_The_Skyline_Problem.cpp
β”‚Β Β  β”œβ”€β”€ a. 1D - Interval - Number of Flowers in Full Bloom.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Sequence - Divide Array in Sets of K Consecutive Numbers.py
β”‚Β Β  β”œβ”€β”€ a. 1D 1 - Continuous Subarray Sum.py
β”‚Β Β  β”œβ”€β”€ a. 1D 1 - Sum - Contiguous 0|1 Array.py
β”‚Β Β  β”œβ”€β”€ a. 1D 1 - Sum - Maxiumum Product Subarray.py
β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Arithmetic Slices.py
β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Frog Jump.py
β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Jump Game II.py
β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Longest Uncommon Subsequence II.py
β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Split Array into Conscutive Subsequences.py
β”‚Β Β  β”œβ”€β”€ a. 1D 2 - Sequence - Wiggle Subsequence.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Amount of New Area Painted Each Day.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Count Integers in Intervals.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Employee Free Time.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Find Right Interval.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Insert Interval.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Interval List Intersections.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Maximum White Tiles Covered by a Carpet.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Meeting Scheduler.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Merge Intervals.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Minimum Number of Arrows to Burst Balloons.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Minimum Number of Taps to Open to Water a Garden.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - My Calendar I.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - My Calendar II.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Range Module.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Remove Covered Intervals.py
β”‚Β Β  β”œβ”€β”€ a. 1D 3 - Interval - Video Stitching.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - 3 Sum.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Container with Most Water.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Count Subarrays With Score Less than K.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Find Two Non-overlapping Sub-arrays Each with Target Sum.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - K-Diff Pairs in Array.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Longest Continuous Subarray With Absolute Diff Less Than or Equal to Limit.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Longest Repeating Character Replacement.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Longest Substring Without Repeating Chars.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Longest Substring with At Least K Repeating Characters.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Longest Substring with at Most Two Distinct Characters.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Max Consecutive Ones II.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Max Consecutive Ones III.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Maximum Distance Between a Pair of Values.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Maximum Length of Subarray with Positive Product.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Maximum Score of a Good Subarray.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Maximum Size Subarray Sum Equals K.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Minimum Window Substring.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Permutation in String.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Trapping Rain Water.py
β”‚Β Β  β”œβ”€β”€ a. 1D 4 - Invariant - Widest Pair of Indices with Equal Range Sum (Prefix Sum).py
β”‚Β Β  β”œβ”€β”€ a. 1D 5 - Simulation - Candy Distribution.py
β”‚Β Β  β”œβ”€β”€ a. 1D 5 - Simulation - Move Pieces to Obtain a String.py
β”‚Β Β  β”œβ”€β”€ b. 1D - Simulation - Minimize Deviation in Array.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Invariant - Best Meeting Point.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Invariant - Number of Boomerangs.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Invariant - Trapping Rain Water II.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Simulation - Minimum Number of Flips to Convert Binary Matrix to Zero Matrix.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Simulation - Remove All Ones with Row and Column Flips II.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Simulation - Self Crossing.py
β”‚Β Β  └── b. 2D - Simulation - Squirrel Simulation.py
β”œβ”€β”€ d. Stack & Queue
β”‚Β Β  β”œβ”€β”€ Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Monostack - Buildings with Sunset View.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Stack - Stack with Max.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Queue - Circular Queue.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Queue - Queue from Stack.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Queue - Queue with Max(using Deque).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Queue - Queue with Max.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Brackets - Valid Bracket.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. File System - Normalize Path Names.py
β”‚Β Β  β”‚Β Β  └── e. RPN - Evaluate RPN.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Exclusive Time of Functions.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Mini Parser.py
β”‚Β Β  β”œβ”€β”€ a. Stack - MonoStack - Remove K Digits.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Next Greater Element.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Score of Parentheses.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Shorten Path (Algo).py
β”‚Β Β  β”œβ”€β”€ a. Stack - Ternary Expression Parser.py
β”‚Β Β  β”œβ”€β”€ b. Monostack  - Build Maximum Binary Tree.py
β”‚Β Β  β”œβ”€β”€ b. Monostack  - Create Maximum Number.py
β”‚Β Β  β”œβ”€β”€ b. Monostack  - Find the Most Competitive Subsequence.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - 132 Pattern.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Car Fleet II.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Largest Rectangle in Histogram.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Minimum Cost Tree From Leaf Values.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Next Greater Element I.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Next Greater Element II.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Odd Even Jump.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Online Stock Span.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Remove Duplicate Letters.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Sum of Subarray Minimums.py
β”‚Β Β  β”œβ”€β”€ b. Monostack - Sum of Subarray Ranges.py
β”‚Β Β  β”œβ”€β”€ c. Brackets - Brace Expansion II.py
β”‚Β Β  β”œβ”€β”€ c. Brackets - Decode String.py
β”‚Β Β  β”œβ”€β”€ c. Brackets - Longest Valid Parentheses.py
β”‚Β Β  β”œβ”€β”€ c. Brackets - Valid Parentheses.py
β”‚Β Β  β”œβ”€β”€ d. Expression - (RPN) Design an Expression Tree with Evaluate Function.py
β”‚Β Β  β”œβ”€β”€ d. Expression - Basic Calculator III.py
β”‚Β Β  β”œβ”€β”€ d. Expression - Basic Calculator.py
β”‚Β Β  β”œβ”€β”€ d. Expression - Build Binary Expression Tree from Infix Expression.py
β”‚Β Β  └── d. Expression - Number of Atoms.py
β”œβ”€β”€ e. Linked List
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 0. Doubly Linked List.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 0. Linked List.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 0. Node.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 0. Node.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Mutate - Cyclical Right Shift.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Mutate - Even Odd Merger.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Mutate - List Pivoting.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Mutate - Reverse Linked List.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Mutate - Reverse Sublist.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - Find Cycle - Detect Cycle.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - Find Cycle - Find Start Node of Cycle (CTCI).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - Find Cycle - Find Start Node of Cycle (Clean).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - Intersect - Test Overlap of Two List (No Cycle).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - Intersect - Test Overlap of Two List (With Cycle).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - Is Palindromic.py
β”‚Β Β  β”‚Β Β  └── c. Merge - Add Two Numbers.py
β”‚Β Β  β”œβ”€β”€ 1_Linked_List_Cycle.cpp
β”‚Β Β  β”œβ”€β”€ 1_Merge_Two_Sorted_Lists.cpp
β”‚Β Β  β”œβ”€β”€ 1_Palindrome_Linked_List.cpp
β”‚Β Β  β”œβ”€β”€ 1_Remove_Duplicates_from_Sorted_List.cpp
β”‚Β Β  β”œβ”€β”€ 1_Remove_Linked_List_Elements.cpp
β”‚Β Β  β”œβ”€β”€ 1_Remove_Nth_Node_From_End_of_List.cpp
β”‚Β Β  β”œβ”€β”€ 1_Reverse_Linked_List.cpp
β”‚Β Β  β”œβ”€β”€ 2_Add_Two_Numbers.cpp
β”‚Β Β  β”œβ”€β”€ 2_Intersection_of_Two_Linked_Lists.cpp
β”‚Β Β  β”œβ”€β”€ 2_Odd_Even_Linked_List.cpp
β”‚Β Β  β”œβ”€β”€ 2_Reverse_Nodes_In_K_Group.cpp
β”‚Β Β  β”œβ”€β”€ 2_Swap_Nodes_in_Pairs.cpp
β”‚Β Β  β”œβ”€β”€ 3_Copy_List_with_Random_Pointer.cpp
β”‚Β Β  β”œβ”€β”€ 3_Merge_k_Sorted_Lists.cpp
β”‚Β Β  β”œβ”€β”€ 3_Sort_List.cpp
β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Number of Binary Tree Topologies (Algo).py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Compute - Add Two Numbers.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Copy List with Random Pointer.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Insert into a Cyclic Sorted List.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Merge Two Sorted Lists.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Node Swap (Algo).py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Partition List.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Plus One Linked List.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Rearrange Linked List (Algo).py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Remove Duplicates from Sorted List II.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Remove Nth Node from End.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Reverse Linked List II.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Rotate List by K.py
β”‚Β Β  β”œβ”€β”€ a. Manipulate - Zip Linked List (Algo).py
β”‚Β Β  └── a. Search - Find Cycle - Linked List Cycle (Floyd's Cycle).py
β”œβ”€β”€ f. Trees
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Binary Tree Node.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Check Height Balance.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Check if Symmetric.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Construct - Build Exterior List from BT.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Construct - Build From Pre-Order List.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Construct - Build from In-Order and Pre-Order sequence.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Construct - Linked List from leaves of BT.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Construct - Right Sibling Tree.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Delete Node.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Find Kth Node.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Find Path Sum with Target Value.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Find Successor.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - LCA Optimize for Close Ancestors.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - LCA with Parent Pointer.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - LCA.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Sum of all Path Binary.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Traversal - Implementation using Stack.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Traversal - InOrder Constant Space with Parent Pointer.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Traversal - InOrder Stack.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Traversal - Morris Constant Space Mutating Traversal.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Tree - Traversal - PreOrder.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - BST Node.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Check if Three BST Nodes are Ordered.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Check if Valid BST.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Construct BST from Pre-Order.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Construct Credit Info using augmented BST.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Find Closest Entries in Three Sorted Arrays.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Find First Greater Than K.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Find K Largest.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Find LCA.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. BST - Find Range Values in BST.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Binary Tree - Traversal - Iterator.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Encode N-ary Tree to Binary Tree.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Node.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Postorder Traversal.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Preorder Traversal.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Serialize and Deserialize N-ary Tree.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Special Tree - Fenwick Tree - Implementation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Special Tree - Segment Tree - Array Implementation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. Trie - Implementation.py
β”‚Β Β  β”‚Β Β  └── e. Trie - Suffix Trie.py
β”‚Β Β  β”œβ”€β”€ 1_Balanced_Binary_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_Balanced_Binary_Tree.py
β”‚Β Β  β”œβ”€β”€ 1_Binary_Tree_Level_Order_Traversal.cpp
β”‚Β Β  β”œβ”€β”€ 1_Binary_Tree_Level_Order_Traversal2.cpp
β”‚Β Β  β”œβ”€β”€ 1_Closest_Binary_Search_Tree_Value.cpp
β”‚Β Β  β”œβ”€β”€ 1_Convert_Sorted_Array_to_Binary_Search_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_Convert_Sorted_Array_to_Binary_Search_Tree.py
β”‚Β Β  β”œβ”€β”€ 1_Lowest_Common_Ancestor_of_a_Binary_Search_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_Maximum_Depth_of_Binary_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_Merge_Two_Binary_Trees.cpp
β”‚Β Β  β”œβ”€β”€ 1_Minimum_Depth_of_Binary_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_N-ary_Tree_Preorder_Traversal_Iterative.cpp
β”‚Β Β  β”œβ”€β”€ 1_Path_Sum.cpp
β”‚Β Β  β”œβ”€β”€ 1_Same_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_Symmetric_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 1_Validate_Binary_Search_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 2_Binary_Tree_Inorder_Traversal.cpp
β”‚Β Β  β”œβ”€β”€ 2_Binary_Tree_Zigzag_Level_Order_Traversal.cpp
β”‚Β Β  β”œβ”€β”€ 2_Binary_Trees_With_Factors.cpp
β”‚Β Β  β”œβ”€β”€ 2_Construct_Binary_Tree_from_Inorder_and_Postorder.py
β”‚Β Β  β”œβ”€β”€ 2_Construct_Binary_Tree_from_Preorder_and_Inorder.cpp
β”‚Β Β  β”œβ”€β”€ 2_Construct_Binary_Tree_from_Preorder_and_Inorder.py
β”‚Β Β  β”œβ”€β”€ 2_Contains_Nearly_Duplicate.py
β”‚Β Β  β”œβ”€β”€ 2_Inorder_Successor_in_BST.cpp
β”‚Β Β  β”œβ”€β”€ 2_Kth_Smallest_Element_in_a_BST.cpp
β”‚Β Β  β”œβ”€β”€ 2_Longest_Univalue_Path.cpp
β”‚Β Β  β”œβ”€β”€ 2_Populating_Next_Right_Pointers_in_Each_Node.cpp
β”‚Β Β  β”œβ”€β”€ 2_Range_Sum_Query_Mutable.py
β”‚Β Β  β”œβ”€β”€ 2_Top_K_Frequent_Elements.cpp
β”‚Β Β  β”œβ”€β”€ 3_Binary_Tree_Maximum_Path_Sum.cpp
β”‚Β Β  β”œβ”€β”€ 3_Kth_Largest.py
β”‚Β Β  β”œβ”€β”€ 3_Lowest_Common_Ancestor_of_a_Binary_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 3_Maximum_XOR_of_Two_Numers_in_Array.py
β”‚Β Β  β”œβ”€β”€ 3_Word_Search_II.py
β”‚Β Β  β”œβ”€β”€ a. BT - Construct - Clone Binary Tree with Random Pointer.py
β”‚Β Β  β”œβ”€β”€ a. BT - Construct - Construct Binary Tree From String.py
β”‚Β Β  β”œβ”€β”€ a. BT - Construct - Flatten Binary Tree (Algo).py
β”‚Β Β  β”œβ”€β”€ a. BT - Construct - Longest Path with Different Adjacent Characters.py
β”‚Β Β  β”œβ”€β”€ a. BT - Construct - Populating Next Right Pointers in Each Node.py
β”‚Β Β  β”œβ”€β”€ a. BT - Construct - Right Sibling Tree Mutated (Algo).py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - (Morris) Flatten Binary Tree to Linked List.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - All Nodes Distance K in Binary Tree.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Compare Leaf Traversal (Algo).py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Convert BST to Sorted Doubly LL.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Count Complete Tree Nodes.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Count Univalue Subrees.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Flip Equivalent Binary Tree.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - House Robber III.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - LCA of List of Nodes.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Maximum Path Sum.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Mutate - Binary Tree Upside Down.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Path Sum III.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Time Needed to Inform All Employees.py
β”‚Β Β  β”œβ”€β”€ a. BT - Traversal - Vertical Order Traversal of a Binary Tree.py
β”‚Β Β  β”œβ”€β”€ b. BST - Compute - Right Smaller Than (Algo).py
β”‚Β Β  β”œβ”€β”€ b. BST - Construct - Min-Height BST from Sorted Array.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Are Same BST (Algo).py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Closest BST Value II.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Closest BST Value.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Convert BST to Greater Tree.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Delete Node in BST.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Inorder Successor in BST.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Recover BST.py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Validate Three Nodes (Algo).py
β”‚Β Β  β”œβ”€β”€ b. BST - Traversal - Verify Preorder Sequence in Binary Search Tree.py
β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Clone N-ary Tree.py
β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Construct Quad Tree.py
β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Logical OR of Two Binary Grids Represented as Quad-Trees.py
β”‚Β Β  β”œβ”€β”€ c. N-ary Tree - Trie - Delete Duplicate Folders in System.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Fenwick - Count Subarrays with More Ones Than Zeros.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Fenwick - Count of Range Sum.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Fenwick - Design Most Recently Used Queue.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Fenwick - Finding MK Average.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Fenwick - Range Sum Query 2D - Mutable.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - RB Tree - Generate First KAB Sqrt2.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Segment Tree - Count of Smaller Numbers After Self.py
β”‚Β Β  β”œβ”€β”€ d. Special Tree - Segment Tree - Range Sum Query - Immutable.py
β”‚Β Β  β”œβ”€β”€ d. Trie - Design Autocomplete System.py
β”‚Β Β  β”œβ”€β”€ d. Trie - Design File System.py
β”‚Β Β  └── d. Trie - Search Suggestion System.py
β”œβ”€β”€ g. Heap
β”‚Β Β  β”œβ”€β”€ Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Top K - K Largest Element.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - Implementation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - K Almost Sorted Array.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - K Closest Stars.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - K Largest in Binary Heap.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - Merge Sorted Arrays.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - Merge Sorted Files.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - Online Median.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - Sort Increasing-Decreasing Array.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap - Top K.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap 1.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Heap 2 - Heap Sort.py
β”‚Β Β  β”‚Β Β  └── c. Heap 3 - kth Largest.py
β”‚Β Β  β”œβ”€β”€ a. Top K - Find K Pairs with Smallest Sums.py
β”‚Β Β  β”œβ”€β”€ a. Top K - K Closest Points to Origin.py
β”‚Β Β  β”œβ”€β”€ a. Top K - Maximum Score of a Node Sequence.py
β”‚Β Β  β”œβ”€β”€ a. Top K - Meeting Rooms II.py
β”‚Β Β  β”œβ”€β”€ a. Top K - Merge k Sorted Lists.py
β”‚Β Β  β”œβ”€β”€ a. Top K - Minimum Cost to Hire K Workers.py
β”‚Β Β  β”œβ”€β”€ a. Top K - Top K Frequent Words.py
β”‚Β Β  β”œβ”€β”€ b. K Distant - K Messed Array Sort.cpp
β”‚Β Β  β”œβ”€β”€ c. Heap Queue - Process Tasks Using Servers.py
β”‚Β Β  β”œβ”€β”€ c. Heap Queue - Single-Threaded CPU.py
β”‚Β Β  └── c. Heap Queue - Smallest Range Covering Elements from K Lists.py
β”œβ”€β”€ h. Sort & Search
β”‚Β Β  β”œβ”€β”€ 1_Binary_Search.py
β”‚Β Β  β”œβ”€β”€ 1_Find_Smallest_Letter_Greater_Than_Target.py
β”‚Β Β  β”œβ”€β”€ 1_First_Bad_Version.cpp
β”‚Β Β  β”œβ”€β”€ 1_Merge_Sorted_Array.cpp
β”‚Β Β  β”œβ”€β”€ 1_Search_Insert_Position.cpp
β”‚Β Β  β”œβ”€β”€ 1_Valid_Perfect_Square.py
β”‚Β Β  β”œβ”€β”€ 2_Capacity_To_Ship_Packages_Within_D_Days.py
β”‚Β Β  β”œβ”€β”€ 2_Find_K_Closest_Elements.py
β”‚Β Β  β”œβ”€β”€ 2_Find_Peak_Element.cpp
β”‚Β Β  β”œβ”€β”€ 2_Meeting_Rooms_II.cpp
β”‚Β Β  β”œβ”€β”€ 2_Merge_Intervals.cpp
β”‚Β Β  β”œβ”€β”€ 2_Search_a_2D_Matrix_II.cpp
β”‚Β Β  β”œβ”€β”€ 2_Search_for_a_Range.cpp
β”‚Β Β  β”œβ”€β”€ 2_Search_in_Rotated_Sorted_Array.cpp
β”‚Β Β  β”œβ”€β”€ 2_Search_in_Rotated_Sorted_Array.py
β”‚Β Β  β”œβ”€β”€ 2_Sort_Colors.cpp
β”‚Β Β  β”œβ”€β”€ 3_Kth_Smallest_Element_in_a_Sorted_Matrix.cpp
β”‚Β Β  β”œβ”€β”€ 3_Median_of_Two_Sorted_Arrays.cpp
β”‚Β Β  β”œβ”€β”€ 3_Split_Array_Largest_Sum.py
β”‚Β Β  β”œβ”€β”€ 3_Wiggle_Sort_II.cpp
β”‚Β Β  β”œβ”€β”€ Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search First of K.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search Kth Largest.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search Missing IP.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search Smallest.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search Sorted Matrix.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search Square Root.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Search Target.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Smallest Non-Constructible Sum.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Sorting Datastructure.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Binary Search - 3 Types Templates.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Merge Sort Inplace.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Merge Sort.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. MergeSort.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Quick Sort.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Quick Sort.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Fast Sorting Using Linked List.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Group By Age.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Team Photo.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. DC Sort - Quick Sort - Dutch Flag Problem.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. Heap Sort.cpp
β”‚Β Β  β”‚Β Β  └── e. Radix Sort.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Count Pairs in Two Arrays.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Divide Chocolate.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Find First and Last Pos of Value in Sorted Array.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Find K-th Smallest Pair Distance.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Find the Smallest Divisor Given a Threshold.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Heaters.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Median of Two Sorted Arrays.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Peak Index in a Mountain Array.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Search in Rotated Sorted Array I.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Search in Rotated Sorted Array II.py
β”‚Β Β  β”œβ”€β”€ a. Binary Search - Split Array Largest Sum.py
β”‚Β Β  β”œβ”€β”€ b. Interval - Find Union of Intervals.py
β”‚Β Β  β”œβ”€β”€ b. Interval - Max Number of Simultaneous Events.py
β”‚Β Β  β”œβ”€β”€ b. Interval - Merge Intervals.py
β”‚Β Β  β”œβ”€β”€ c. Threshold - Find Salary Cap.py
β”‚Β Β  β”œβ”€β”€ d. Sort - Brute Sort - Bad Sorters.cpp
β”‚Β Β  β”œβ”€β”€ d. Sort - Brute Sort - Sort Array by Parity.py
β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Compare Version Numbers.py
β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Number of Weak Characters in the Game.py
β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Pancake Sort.cpp
β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Remove Duplicate.py
β”‚Β Β  β”œβ”€β”€ d. Sort - Custom Sort - Sort Transformed Array.py
β”‚Β Β  β”œβ”€β”€ e. DC Sort - Merge Sort - Count Merge Sort (Algo).py
β”‚Β Β  β”œβ”€β”€ e. Special Sort - Radix Sort - Maximum Gap.py
β”‚Β Β  └── f. Special Sort - Wiggle Sort.py
β”œβ”€β”€ i. Recursion & Backtrack
β”‚Β Β  β”œβ”€β”€ 2_All_Possible_Full_Binary_Trees.py
β”‚Β Β  β”œβ”€β”€ 2_Array_to_BST_Permutation.py
β”‚Β Β  β”œβ”€β”€ 2_Generate_Parentheses.cpp
β”‚Β Β  β”œβ”€β”€ 2_Letter_Combinations_of_a_Phone_Number.cpp
β”‚Β Β  β”œβ”€β”€ 2_Permutations.cpp
β”‚Β Β  β”œβ”€β”€ 2_Snakes_and_Ladders.py
β”‚Β Β  β”œβ”€β”€ 2_Subsets.cpp
β”‚Β Β  β”œβ”€β”€ 2_Word_Search.cpp
β”‚Β Β  β”œβ”€β”€ 3_Palindrome_Partitioning.cpp
β”‚Β Β  β”œβ”€β”€ 3_Regular_Expression_Matching.cpp
β”‚Β Β  β”œβ”€β”€ 3_Remove_Invalid_Parentheses.cpp
β”‚Β Β  β”œβ”€β”€ 3_Wildcard_Matching.cpp
β”‚Β Β  β”œβ”€β”€ Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Recursion - Gray Code.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Recursion - N-Queens.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Recursion - Sudoku Solver.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Recursion - Towers of Hanoi.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Backtracking - N-Queen.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Backtracking - Scheduling - Interval Covering Problem.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Backtradking - Scheduling - Schedule to Minimize Time.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutation - Apply Permutation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutation - Find Next Permutation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Generate Permutations.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Generate all Binary Tree.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Generate all Palindromes from String.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Generate all Subsets of Size K.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Generate all Subsets.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Generate all Valid Parentheses String of K.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Permutations - Recursive Implementation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Random - Compute Random Permutation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Random - Non-uniform Random Numbers.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Random - Online Random Sampling.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Random - Random Subarray.py
β”‚Β Β  β”‚Β Β  └── d. Random - Random Subset.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - 24 Game.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Android Unlock Patterns.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Count Number of Texts.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Cracking the Safe.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Distinct Subsequences.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Generate Parentheses.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Letter Combination of Phone Number.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Minimum Time to Finish the Race.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Number of Music Playlist.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Reaching Points.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Regular Expression Matching.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Scramble String.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Strobogrammatic Number II.py
β”‚Β Β  β”œβ”€β”€ a. Recursion - Word Search II.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Game - Can I Win.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Game - Flip Game II.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Game - Predict the Winner.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Matchsticks to Square.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Maximum Score Words Formed by Letters.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - 1 Bit and 2 Bit Characters.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Different Ways to Add Parentheses.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Generalized Abbreviation.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Guess Number Higher or Lower II.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Increasing Subsequences.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Letter Combinations of a Phone Number.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Number of Dice Rolls With Target Sum.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Palindrome Partitioning I.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Palindrome Partitioning II.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Partition to K Equal Sum Subsets.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Restore IP Addresses.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Student Attendance Record II.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Path - Word Squares.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Scheduling - Minimum Number of Work Sessions to Finish the Task.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Scheduling - Optimum Task Time Allocation.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Simulation - Number of Ways to Build Sturdy Brick Wall.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Simulation - Robot Room Cleaner.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Simulation - Unique Paths.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Simultation - Execution of all Suffix Instruction in Grid.py
β”‚Β Β  β”œβ”€β”€ b. Backtrack - Wild Card - Valid Parenthesis String.py
β”‚Β Β  β”œβ”€β”€ b. Backtracking - Path - Optimal Account Balancing.py
β”‚Β Β  β”œβ”€β”€ c. Permutation - Next Permutation.py
β”‚Β Β  β”œβ”€β”€ c. Permutation - Permutations I.py
β”‚Β Β  β”œβ”€β”€ c. Permutation - Permutations II.py
β”‚Β Β  β”œβ”€β”€ c. Permutation - nth Permutation.py
β”‚Β Β  β”œβ”€β”€ d. Combination - Closest Subsequence Sum.py
β”‚Β Β  β”œβ”€β”€ d. Combination - Combination Sum.py
β”‚Β Β  β”œβ”€β”€ d. Combination - Factor Combinations.py
β”‚Β Β  β”œβ”€β”€ d. Combination - Partition Array Into Two Arrays to Minimize Sum Difference.py
β”‚Β Β  β”œβ”€β”€ d. Combination - Subsets I.py
β”‚Β Β  └── d. Combination - Subsets II.py
β”œβ”€β”€ j. DP
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 01knapsack.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ Sales_Path.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Combinations - String to Dictionary Word Decomposition(BBB problem).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Kadane.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Optimal Path - Find Minimum Weight Path in Triangle.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Optimal Path - Pick Up Coins for Maximum Gain.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Optimal Path - The Pretty Printing Problem.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Sum - Compute Binomial Coefficient.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Sum - Count Number of Ways to Traverse in 2D Grid.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Sum - Count the Number of Moves to Climb Stairs.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path - Sum - Is Pattern Contained in Grid.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path 1 - Sum - Find Max Subarrary.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Path 2 - Combinations - Count the Number of Score Combinations.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Edit Distance - Levenshtein Distance.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. LIS - Find Longest Non-decreasing Subsequence.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. LIS - Implementation.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ f. Knapsack.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ hashmap.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ hashset.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ knapsack.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ lcs.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ lics.cpp
β”‚Β Β  β”‚Β Β  └── number_of_paths.cpp
β”‚Β Β  β”œβ”€β”€ 1_Maximum_Subarray.cpp
β”‚Β Β  β”œβ”€β”€ 2_Combination_Sum.py
β”‚Β Β  β”œβ”€β”€ 2_Jump_Game.cpp
β”‚Β Β  β”œβ”€β”€ 2_Number_of_Dice_Rolls_With_Target_Sum.py
β”‚Β Β  β”œβ”€β”€ 2_Subarray_Sum_Equals_K.py
β”‚Β Β  β”œβ”€β”€ 2_Target_Sum.py
β”‚Β Β  β”œβ”€β”€ 3_Cherry_Pickup_II.py
β”‚Β Β  β”œβ”€β”€ 3_Edit_Distance.cpp
β”‚Β Β  β”œβ”€β”€ 3_Find_All_Concatenated_Words.py
β”‚Β Β  β”œβ”€β”€ 3_Maximal_Rectangle.cpp
β”‚Β Β  β”œβ”€β”€ 3_Maximum_Product_Subarray.cpp
β”‚Β Β  β”œβ”€β”€ 3_Minimum_Window_Substring.py
β”‚Β Β  β”œβ”€β”€ 3_Number_of_Ways_to_Paint_Nx3_Grid.py
β”‚Β Β  β”œβ”€β”€ 3_Perfect_Squares.cpp
β”‚Β Β  β”œβ”€β”€ 3_Word_Break_II.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Climbing Stairs.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Coin Change 1 - Fewest coin for the amount.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Coin Change 2 - Number of combinations for the amount.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Combination Sum IV.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Combinations - Count Unique Characters of All Substring of a Given String.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Combinations - Total Appeal of String.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Decode Ways.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Longest Palindromic Subsequence.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Longest String Chain (Algo).py
β”‚Β Β  β”œβ”€β”€ a. 1D - Maximum Length of Repeated Subarray.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Minimum Cost For Tickets.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Minimum Number of Refueling Stops.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Paint Fence.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Paint House 1.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Paint House 2 - with color cost.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Paint House 3 - with already painted houses.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Path - Combinations - Number of Ways to Select Buildings.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Race Car.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Rod Cutting Problem.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Sum - Number of People Aware of a Secret.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Unique BSTs.py
β”‚Β Β  β”œβ”€β”€ a. 1D - Word Break.py
β”‚Β Β  β”œβ”€β”€ a. Kadane - Maximum Sum Circular Subarray.py
β”‚Β Β  β”œβ”€β”€ a. Path - Optimal Range - Maximum Product Subarray.py
β”‚Β Β  β”œβ”€β”€ a. Path - Optimal Range - Maximum Subarray (Kadane).py
β”‚Β Β  β”œβ”€β”€ a. Path - Stock - Buy and Sell Twice.py
β”‚Β Β  β”œβ”€β”€ a. Path - Sum - Dungeon Game.py
β”‚Β Β  β”œβ”€β”€ a. Path - Sum - House Robber I.py
β”‚Β Β  β”œβ”€β”€ a. Path - Sum - House Robber II (circular).py
β”‚Β Β  β”œβ”€β”€ a. Path - Sum - Unique Substrings in Wraparound String.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Champagne Tower.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Has Square of Zero Border (Algo).py
β”‚Β Β  β”œβ”€β”€ b. 2D - Interleaving String.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Longest Line of Consecutive One in Matrix.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Maximal Square.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Maximum Score from Performing Multiplication Operations.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Minimum Cost to Merge Stones.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Minimum Cuts for Partitioning Palindrome.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Minimum Difficulty of a Job Schedule.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Out of Boundary Paths.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Rectangle Mania (Algo).py
β”‚Β Β  β”œβ”€β”€ b. 2D - Stamping the Grid.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Sum - Maximum Number of Points with Cost.py
β”‚Β Β  β”œβ”€β”€ b. 2D - Tiling a Rectangle with the Fewest Squares.py
β”‚Β Β  β”œβ”€β”€ b. Path - Minimum Path Sum.py
β”‚Β Β  β”œβ”€β”€ b. Path - Unique Paths 1.py
β”‚Β Β  β”œβ”€β”€ b. Path - Unique Paths 2 - with obstacle.py
β”‚Β Β  β”œβ”€β”€ c. LCS - Longest Common Subsequence.py
β”‚Β Β  β”œβ”€β”€ c. LCS - Return longest string(Algo).py
β”‚Β Β  β”œβ”€β”€ d. LCS - Delete Operation for Two Strings.py
β”‚Β Β  β”œβ”€β”€ d. LIS - Longest Increasing Subsequence.py
β”‚Β Β  β”œβ”€β”€ d. LIS - Number of Longest Increasing Subsequence.py
β”‚Β Β  β”œβ”€β”€ e. Edit Distance.py
β”‚Β Β  β”œβ”€β”€ f. Knapsack - Maximum Profit in Job Scheduling.py
β”‚Β Β  β”œβ”€β”€ f. Knapsack - Ones and Zeroes.py
β”‚Β Β  β”œβ”€β”€ f. Knapsack.py
β”‚Β Β  β”œβ”€β”€ g. Partition.py
β”‚Β Β  β”œβ”€β”€ h. Best Time Buy and Sell Stock 1.py
β”‚Β Β  β”œβ”€β”€ h. Best Time Buy and Sell Stock 2 Multibuy.py
β”‚Β Β  β”œβ”€β”€ h. Best Time Buy and Sell Stock 3 Up to two buys.py
β”‚Β Β  β”œβ”€β”€ h. Best Time Buy and Sell Stock 4 Up to K buys.py
β”‚Β Β  β”œβ”€β”€ h. Best Time Buy and Sell Stock 5 Multibuy with 1 day cooldown.py
β”‚Β Β  β”œβ”€β”€ h. Best Time Buy and Sell Stock 6 Multibuy with transaction fee.py
β”‚Β Β  β”œβ”€β”€ h. Max Profit with K Transactions (Algo).py
β”‚Β Β  └── i. Chain Multiplication - Burst Balloons.py
β”œβ”€β”€ k. Graphs
β”‚Β Β  β”œβ”€β”€ 0_Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ 0. Graph Representation.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. UnionFind 1 - Simple.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. UnionFind 2 - Path Compression.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. UnionFind 3 - Rank.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. UnionFind 4 - Path Compression Rank.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. UnionFind 5 - Cycle Detection.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. UnionFind 5 - Tracking Size.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. GraphSearch 2 - DFS - Clone a graph.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. GraphSearch 3 - Dijkstra (Algo).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. GraphSearch 3 - Dijkstra.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. GraphSearch 4 - Bellman Ford.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. GraphSearch 6 - Floyd Warshall.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - DFS - Dreadlock Detection.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search - DFS - Paint a Boolean Matrix.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Clone a Graph.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Compute Enclosed Regions.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Is Pin Placement Feasible.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Transform a String.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Team Photo Day 2.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. MinSpanTree - Kruskal.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. MinSpanTree - Prim.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Cycle Detection - Detect Cycle.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ d. Cycle Detection - Euler Circuit.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. TopoSort - Implementation (Algo).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ e. TopoSort 1 - DFS.py
β”‚Β Β  β”‚Β Β  └── e. Toposort 2 - BFS.py
β”‚Β Β  β”œβ”€β”€ 1_Max_Area_of_Island.cpp
β”‚Β Β  β”œβ”€β”€ 2_Find_the_Celebrity.cpp
β”‚Β Β  β”œβ”€β”€ 2_Insert_into_a_Cyclic_Sorted_List.cpp
β”‚Β Β  β”œβ”€β”€ 2_Minimize_Hamming_Distance_After_Swap_Operations.py
β”‚Β Β  β”œβ”€β”€ 2_Number_of_Islands.cpp
β”‚Β Β  β”œβ”€β”€ 2_Synonymous_Sentences.py
β”‚Β Β  β”œβ”€β”€ 3_Count_of_Smaller_Numbers_After_Self.cpp
β”‚Β Β  β”œβ”€β”€ 3_Course_Schedule.cpp
β”‚Β Β  β”œβ”€β”€ 3_Course_Schedule_II.cpp
β”‚Β Β  β”œβ”€β”€ 3_Friend_Circles.cpp
β”‚Β Β  β”œβ”€β”€ 3_Longest_Increasing_Path_in_a_Matrix.cpp
β”‚Β Β  β”œβ”€β”€ 3_Surrounded_Regions.cpp
β”‚Β Β  β”œβ”€β”€ 3_Word_Ladder.cpp
β”‚Β Β  β”œβ”€β”€ a. Union Find - Accounts Merge.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Bipartition - Possible Bipartition.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Checking Existence of Edge Length Limited Paths.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Count Unreachable Pairs in Undirected Graph.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Find All People with Secret.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Making a Large Island.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Minimize Malware Spread.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Number of Islands II.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Rank Transform of a Matrix.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Regions Cut by Slashes.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Remove Max Number of Edges to Keep Graph Fully Traversable.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Satisfiability of Equality Equations.py
β”‚Β Β  β”œβ”€β”€ a. Union Find - Similar String Groups.py
β”‚Β Β  β”œβ”€β”€ b. Graph Search - BFS - Shortest Path Visiting All Nodes.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Bus Routes.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Clone Graph.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Closest Node to Path in Tree.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Escape the Spreading Fire.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Evaluate Division.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Minimum Moves to Move a Box to Their Target Location.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Pacific Atlantic Water Flow.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Shortest Distance from All Buildings.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Word Ladder I (Word Chain).py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS - Word Ladder II.py
β”‚Β Β  β”œβ”€β”€ b. Search 1 - BFS Bidirectional - Jump Game IV.py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Airport Connectinos (Algo).py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Bridges in Graph, Two-Edge-Connected Graph (Algo).py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Is Graph Bipartite.py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Longest Cycle in a Graph.py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Longest Increasing Path in a Matrix.py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Most Stones Removed with Same Row or Column.py
β”‚Β Β  β”œβ”€β”€ b. Search 2 - DFS - Path with Maximum Minimum Value.py
β”‚Β Β  β”œβ”€β”€ b. Search 3 - Dijkstra - Minimum Weighted Subgraph with the Required Paths.py
β”‚Β Β  β”œβ”€β”€ b. Search 3 - Dijkstra - The Maze II.py
β”‚Β Β  β”œβ”€β”€ b. Search 3 - Dijkstra - The Maze III.py
β”‚Β Β  β”œβ”€β”€ b. Search 4 - A Star - Implementation (Algo).py
β”‚Β Β  β”œβ”€β”€ b. Search 4 - AStar - Shortest Path in a Grid with Obstacles Elimination.py
β”‚Β Β  β”œβ”€β”€ b. Search 5 - Bellman Ford - Detect Arbitrage (Algo).py
β”‚Β Β  β”œβ”€β”€ e. TopoSort - Alien Dictionary.py
β”‚Β Β  β”œβ”€β”€ e. TopoSort - Course Schedule II.py
β”‚Β Β  β”œβ”€β”€ e. TopoSort - Kahn - Find All Possible Recipes from Given Supplies.py
β”‚Β Β  β”œβ”€β”€ e. TopoSort - Maximum Employees to Be Invited to a Meeting.py
β”‚Β Β  β”œβ”€β”€ e. TopoSort - Parallel Courses (Kahn).py
β”‚Β Β  β”œβ”€β”€ e. TopoSort - Sequence Reconstruction.py
β”‚Β Β  └── f. MaxFlow - Maximum Number of Accepted Invitations.py
β”œβ”€β”€ l. Design
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ LRU Cache (Algo).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ LRU_Cache.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ generator.py
β”‚Β Β  β”‚Β Β  └── iterator.py
β”‚Β Β  β”œβ”€β”€ 1_Min_Stack.cpp
β”‚Β Β  β”œβ”€β”€ 1_Shuffle_an_Array.cpp
β”‚Β Β  β”œβ”€β”€ 2_Design_Tic-Tac-Toe.cpp
β”‚Β Β  β”œβ”€β”€ 2_Encode_and_Decode_TinyURL.cpp
β”‚Β Β  β”œβ”€β”€ 2_Flatten_2D_Vector.cpp
β”‚Β Β  β”œβ”€β”€ 2_Insert_Delete_GetRandom_O(1).cpp
β”‚Β Β  β”œβ”€β”€ 2_Range_Sum_Query_2D-Mutable.cpp
β”‚Β Β  β”œβ”€β”€ 2_Serialize_and_Deserialize_Binary_Tree.cpp
β”‚Β Β  β”œβ”€β”€ 3_Implement_Trie_(Prefix_Tree).cpp
β”‚Β Β  β”œβ”€β”€ 3_LRU_Cache.cpp
β”‚Β Β  β”œβ”€β”€ a. File System - Design In-Memory File System.py
β”‚Β Β  β”œβ”€β”€ a. File System - Read N Characters Given Read4 Multi-Call.py
β”‚Β Β  β”œβ”€β”€ a. File System - Read N Characters Given Read4.py
β”‚Β Β  β”œβ”€β”€ a. File System - UTF-8 Validation.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Design Browser History.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Max Stack.py
β”‚Β Β  β”œβ”€β”€ a. Stack - Min Stack.py
β”‚Β Β  β”œβ”€β”€ b. Class - LFU Cache.py
β”‚Β Β  β”œβ”€β”€ b. Class - Zigzag Iterator.py
β”‚Β Β  β”œβ”€β”€ b. Queue - LRU Cache.py
β”‚Β Β  β”œβ”€β”€ c. Stack - Maximum Frequency Stack.py
β”‚Β Β  β”œβ”€β”€ d. Hash - Design Log Aggregation System.py
β”‚Β Β  β”œβ”€β”€ d. Hash - Insert Delete GetRandom O(1).py
β”‚Β Β  β”œβ”€β”€ d. Hash - Logger Rate Limiter.py
β”‚Β Β  β”œβ”€β”€ d. Queue - Design Rate Limiting System.py
β”‚Β Β  β”œβ”€β”€ e. Tree - Design Search Autocomplete System.py
β”‚Β Β  β”œβ”€β”€ e. Tree - Serialize and Deserialize Binary Tree.py
β”‚Β Β  β”œβ”€β”€ h. Application - Design A Leaderboard.py
β”‚Β Β  β”œβ”€β”€ h. Application - Design Excel Sum Formula.py
β”‚Β Β  β”œβ”€β”€ h. Application - Design Log Storage System.py
β”‚Β Β  β”œβ”€β”€ h. Application - Design Twitter.py
β”‚Β Β  β”œβ”€β”€ h. Application - Design Video Sharing Platform.py
β”‚Β Β  β”œβ”€β”€ h. Application - Design a Food Rating System.py
β”‚Β Β  β”œβ”€β”€ h. Application - Find Servers That Handled Most Number of Requests.py
β”‚Β Β  β”œβ”€β”€ h. Application - Remove Comments.py
β”‚Β Β  β”œβ”€β”€ h. Application - Stock Price Fluctuation.py
β”‚Β Β  β”œβ”€β”€ h. Application - Tweet Counts Per Frequency.py
β”‚Β Β  └── i. Network - IP to CIDR.py
β”œβ”€β”€ m. Math
β”‚Β Β  β”œβ”€β”€ 0. Template
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Division - Find All Divisor.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Division - GCD.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Division - LCM.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Division - Prime Factors.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Exponent - Binary Exponent.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Exponent - Power Modulus.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Factorial.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Factorial.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Multiplication - Multiply Two Large Numbers(Karatsuba).py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ a. Operator - Transpose.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Binomial Coefficient.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Catalan.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Collatz - Test Collatz Conjecture.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - M-aryToDecimal.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Pascal - Generate Pascal Triangle.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Prime - Check Prime.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Prime - Prime Factor.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - Prime - Sieve's Generate Prime.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ b. Numbers - decimalToM-ary.cpp
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Geometry - Intersect Rectangle.py
β”‚Β Β  β”‚Β Β  β”œβ”€β”€ c. Probability - Combination.cpp
β”‚Β Β  β”‚Β Β  └── c. Probability - Permutation & Combination.cpp
β”‚Β Β  β”œβ”€β”€ 01_Largest_Palindrome_Product.cpp
β”‚Β Β  β”œβ”€β”€ 1_Count_Primes.cpp
β”‚Β Β  β”œβ”€β”€ 1_Excel_Sheet_Column_Title.cpp
β”‚Β Β  β”œβ”€β”€ 1_Pascals_Triangle.cpp
β”‚Β Β  β”œβ”€β”€ 1_Pascals_Triangle_II.cpp
β”‚Β Β  β”œβ”€β”€ 1_Power_of_Three.cpp
β”‚Β Β  β”œβ”€β”€ 1_Power_of_Two.cpp
β”‚Β Β  β”œβ”€β”€ 1_Roman_to_Integer.cpp
β”‚Β Β  β”œβ”€β”€ 1_Self_Dividing_Numbers.cpp
β”‚Β Β  β”œβ”€β”€ 2_Bulb_Switcher.cpp
β”‚Β Β  β”œβ”€β”€ 2_Divide_Two_Integers.cpp
β”‚Β Β  β”œβ”€β”€ 2_Evaluate_Reverse_Polish_Notation.cpp
β”‚Β Β  β”œβ”€β”€ 2_Excel_Sheet_Column_Number.cpp
β”‚Β Β  β”œβ”€β”€ 2_Factorial_Trailing_Zeroes.cpp
β”‚Β Β  β”œβ”€β”€ 2_Fraction_to_Recurring_Decimal.cpp
β”‚Β Β  β”œβ”€β”€ 2_Happy_Number.cpp
β”‚Β Β  β”œβ”€β”€ 2_Next_Permutation.cpp
β”‚Β Β  β”œβ”€β”€ 2_Pow(x,n).cpp
β”‚Β Β  β”œβ”€β”€ 2_Sqrt(x).cpp
β”‚Β Β  β”œβ”€β”€ 3_Largest_Number.cpp
β”‚Β Β  β”œβ”€β”€ 3_Max_Points_on_a_Line.cpp
β”‚Β Β  β”œβ”€β”€ a. Operator - Addition - Plus One.py
β”‚Β Β  β”œβ”€β”€ a. Operator - Division - Fraction Addition and Subtraction.py
β”‚Β Β  β”œβ”€β”€ a. Operator - Division - GCD - Smallest Integer Divisible by K.py
β”‚Β Β  β”œβ”€β”€ a. Operator - Division - GCD - Water and Jug Problem (Die Hard).py
β”‚Β Β  β”œβ”€β”€ a. Operator - Division - Minimum Factorization.py
β”‚Β Β  β”œβ”€β”€ a. Operator - Division - Mininum Replacements to Sort the Array.py
β”‚Β Β  β”œβ”€β”€ a. Operator - Power - Super Pow.py
β”‚Β Β  β”œβ”€β”€ a. Operator - Sqrt - Sum of Square Numbers.py
β”‚Β Β  β”œβ”€β”€ b. Number - Random - Implement Rand10 Using Rand7.py
β”‚Β Β  β”œβ”€β”€ b. Numbers - Binary Coeff - Pascals Triangle II.py
β”‚Β Β  β”œβ”€β”€ b. Numbers - Custom Sequence - Broken Calculator.py
β”‚Β Β  β”œβ”€β”€ b. Numbers - Custom Sequence - Magical String.py
β”‚Β Β  β”œβ”€β”€ b. Numbers - Custom Sequence - Nth Magical Number.py
β”‚Β Β  β”œβ”€β”€ b. Numbers - Prime - Super Ugly Number.py
β”‚Β Β  β”œβ”€β”€ c. Probability - New 21 Game.py
β”‚Β Β  β”œβ”€β”€ c. Probability - Random Sampling - Linked List Random Node.py
β”‚Β Β  β”œβ”€β”€ d. Other - Count - Integer to English Words.py
β”‚Β Β  β”œβ”€β”€ d. Other - Geometry - Convex Polygon.py
β”‚Β Β  β”œβ”€β”€ d. Other - Geometry - Detect Squares.py
β”‚Β Β  β”œβ”€β”€ d. Other - Geometry - Valid Triangle Number.py
β”‚Β Β  β”œβ”€β”€ d. Other - Knowledge - Day of the week.py
β”‚Β Β  β”œβ”€β”€ d. Other - Knowledge - H-index.py
β”‚Β Β  β”œβ”€β”€ d. Other - Math - Consecutive Numbers Sum.py
β”‚Β Β  β”œβ”€β”€ d. Other - Math - Largest Multiple of Three.py
β”‚Β Β  β”œβ”€β”€ d. Other - Math - Nth Digit.py
β”‚Β Β  β”œβ”€β”€ d. Other - Math - Number of Digit One.py
β”‚Β Β  β”œβ”€β”€ d. Other - Math - Rotate Function.py
β”‚Β Β  β”œβ”€β”€ d. Other - Math - Sum of Numbers with Units Digit K.py
β”‚Β Β  └── d. Other - Valid Number.py
└── n. Parallel Computing
    β”œβ”€β”€ Template
    β”‚Β Β  β”œβ”€β”€ Caching for a Multithreaded Dictionary (Bad Implementation).cpp
    β”‚Β Β  β”œβ”€β”€ Implement a Thread Pool.cpp
    β”‚Β Β  β”œβ”€β”€ Semaphore.cpp
    β”‚Β Β  β”œβ”€β”€ Two Synchronized Interleaving Threads.cpp
    β”‚Β Β  └── Two Unsynchronyzed Interleaved Threads.cpp
    └── a. Deadlock - Traffic Light Controlled Intersection.py

28 directories, 896 files
```  </Details>