Skip to content

In depth analysis and solutions to coding practice problems on Laicode

License

Notifications You must be signed in to change notification settings

EEexplorer001/coding-practice

 
 

Repository files navigation

Coding practice problems on LeetCode and LaiCode

Currently in the process to change everything to meet the industrial standard, aka a more legit way

  • Manage and build the project with Maven both locally and with GitHub Action.

  • Not a redundant but enhanced layer: use npm to utilize useful packages such as prettier, husky, git-branch-is, etc. if you like to. It may be also managed by Maven, but since they are not required and it is more natural for me to use npm, I decide to add this extra layer.

  • Completed:

    • Sorting Algorithms
    • Binary Search
    • Recursion
    • Queue & Stack
    • Linked List
    • Binary Tree

Table of Contents

  1. Sorting Algorithms

    1. Selection Sort
    2. Merge Sort
    3. Quick Sort
    4. Move 0's to the End I
    5. Rainbow Sort
  2. Binary Search

    1. Classical Binary Search
    2. Search in Sorted Matrix I
    3. Closest in Sorted Array
    4. First Occurrence
    5. Last Occurrence
    6. K Closest in Sorted Array
    7. Search in Unknown Sized Sorted Array
    8. Find Minimum in Rotated Sorted Array
  3. Recursion

    1. Fibonacci Number
    2. A to the Power of B
  4. Queue & Stack

    1. Sort with 3 Stacks
    2. Queue by Two Stacks
    3. Stack with min()
    4. Sort with 2 Stacks
  5. Linked List

    1. Reverse Linked List
    2. Middle Node of Linked List
    3. Check if Linked List Has a Cycle
    4. Insert in Sorted Linked List
    5. Merge Two Sorted Linked Lists
    6. Reorder Linked List
    7. Partition Linked List
    8. Add Two Numbers
    9. Merge Sort Linked List
    10. Check if Linked List is Palindrome
    11. Cycle Node in Linked List
  6. Binary Tree

    1. In-order Traversal of Binary Tree
    2. Pre-order Traversal of Binary Tree
    3. Post-order Traversal of Binary Tree
    4. Check if Binary Tree is Balanced
    5. Symmetric Binary Tree
    6. Tweaked Identical Binary Trees
    7. Is Binary Search Tree or Not
    8. Get Keys in Binary Search Tree in Given Range
    9. Binary Tree Path Sum to Target I
    10. Search in Binary Search Tree
    11. Insert in Binary Search Tree
  7. Heap & Graph Search Algorithms I (BFS)

    1. K Smallest in Unsorted Array
    2. Get Keys in Binary Tree Layer by Layer
    3. Bipartite
    4. Check if Binary Tree is Completed
    5. Kth Smallest Number in Sorted Matrix
    6. Number of Islands
    7. Walls and Gates
  8. DFS

    1. All Subsets I
    2. All Valid Permutations of Parentheses I
    3. Combinations of Coins
    4. All Permutations I
  9. HashTable

    1. Top K Frequent Words
    2. Missing Number I
    3. Common Numbers of Two Sorted Arrays
  10. String I

    1. Remove Certain Characters
    2. Remove Spaces
    3. Remove Adjacent Repeated Characters I
    4. Remove Adjacent Repeated Characters IV
    5. Determine if One String is Another's Substring
  11. String II

    1. Reverse String
    2. Reverse Words in a Sentence I
    3. Right Shift by N Characters
    4. String Replace
    5. ReOrder Array
    6. All Permutations II
    7. Decompress String II
    8. Longest Substring without Repeating Characters
    9. All Anagrams
  12. Bit Representation & Operation

    1. Power of Two
    2. Number of Different Bits
    3. All Unique Characters II
    4. Hexadecimal Representation
  13. DFS II

    1. All Subsets II
    2. All Valid Permutations of Parentheses II
    3. All Subsets Size of K
  14. Dynamic Programming I

    1. Longest Ascending SubArray
    2. Max Product of Cutting Rope
    3. Array Hopper I
  15. Dynamic Programming II

    1. Array Hopper II
    2. Largest SubArray Sum
    3. Dictionary Word I
    4. Edit Distance
    5. Largest Square of 1's
  16. Dynamic Programming III

    1. Largest SubArray Sum
    2. Longest Consecutive 1's
    3. Longest Cross of 1's
    4. Largest X of 1's
    5. Largest SubMatrix Sum
  17. Probability, Sampling & Randomization

    1. Perfect Shuffle
    2. Reservoir Sampling
    3. Random7 Using Random5
    4. Random1000 Using Random5
    5. Median Tracker
    6. 95 Percentile
  18. Recursion II

    1. N Queens
    2. Spiral Order Traverse I
    3. Spiral Order Traverse II
    4. Lowest Common Ancestor I
    5. Lowest Common Ancestor II
    6. Maximum Path Sum Binary Tree III
    7. Maximum Path Sum Binary Tree II
    8. Binary Tree Path Sum to Target III
  19. Cross Training I

    1. Array Deduplication I
    2. Array Deduplication II
    3. Array Deduplication III
    4. Array Deduplication IV
    5. Move 0's to the End II
    6. Largest and Smallest
    7. Largest and Second Largest
    8. Get Keys in Binary Tree Layer by Layer Zig-Zag Order
    9. Rotate Matrix
    10. Two Sum
    11. Two Sum All Pair I
    12. Two Sum All Pair II
    13. Three Sum
  20. Cross Training II

    1. Deep Copy Linked List with Random Pointer
    2. Deep Copy Undirected Graph
    3. Merge K Sorted Arrays
    4. Merge K Sorted Lists
    5. Closest Number in Binary Search Tree
    6. Largest Number Smaller in Binary Search Tree
    7. Delete in Binary Search Tree
  21. Cross Training III

  22. Cross Training IV

    1. Kth Smallest in Two Sorted Arrays
    2. Maximum Values of Size K Sliding Windows
    3. Implement LRU Cache
    4. First Non-Repeating Character in Stream
    5. Majority Number I
  23. Cross Training V

  24. Cross Training VI

    1. Longest Ascending Subsequence
    2. Longest Common Substring
  25. Free Practice

    1. Palindrome Permutation
    2. Palindrome Permutation II
    3. Plus One
    4. Clone Graph

About

In depth analysis and solutions to coding practice problems on Laicode

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%