Skip to content

yunpengn/LeetCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LeetCode

CI pipeline Codacy Badge

This repository contains my solutions to some selected programming problems on LeetCode. You may want to read this article to understand what makes this repository different from other LeetCode solution repositories hosted on GitHub.

About Me

I am a software enginer and hold a bachelor's degree in Computer Engineering from the National University of Singapore. I am passionate about programming and software engineering.

Table of Contents

Algorithms

  1. Two sum
    [Problem] [My Answer] [Submission]
  2. Add two numbers
    [Problem] [My Answer] [Submission]
  3. Longest substring without repeating characters
    [Problem] [My Answer] [Submission]
  4. Medians of two sorted arrays
    [Problem] [My Answer] [Submission]
  5. Longest palindrome substring
    [Problem] [My Answer] [Submission]
  6. Zigzag conversion
    [Problem] [My Answer] [Submission]
  7. Reverse integer
    [Problem] [My Answer] [Submission]
  8. String to Integer (ATOI)
    [Problem] [My Answer] [Submission]
  9. Palindrome number
    [Problem] [My Answer] [Submission]
  10. Regular Expression Matching
    [Problem] [My Answer] [Submission]
  11. Container with Most Water
    [Problem] [My Answer] [Submission]
  12. Integer to Roman
    [Problem] [My Answer] [Submission]
  13. Roman to Integer
    [Problem] [My Answer] [Submission]
  14. Longest Common Prefix
    [Problem] [My Answer] [Submission]
  15. Three Sum
    [Problem] [My Answer] [Submission]
  16. Three Sum Closest
    [Problem] [My Answer] [Submission]
  17. Letter Combinations of a Phone Number
    [Problem] [My Answer] [Submission]
  18. Four Sum
    [Problem] [My Answer] [Submission]
  19. Remove Nth Node From End of List
    [Problem] [My Answer] [Submission]
  20. Valid Parentheses
    [Problem] [My Answer] [Submission]
  21. Merge Two Sorted Lists
    [Problem] [My Answer] [Submission]
  22. Generate Parentheses
    [Problem] [My Answer] [Submission]
  23. Merge k Sorted Lists
    [Problem] [My Answer] [Submission]
  24. Swap Nodes in Pairs
    [Problem] [My Answer] [Submission]
  25. Reverse Nodes in k-Group
    [Problem] [My Answer] [Submission]
  26. Remove Duplicates from Sorted Array
    [Problem] [My Answer] [Submission]
  27. Remove Element
    [Problem] [My Answer] [Submission]
  28. Implement strStr()
    [Problem] [My Answer] [Submission]
  29. Divide Two Integers
    [Problem] [My Answer] [Submission]
  30. Next Permutation
    [Problem] [My Answer] [Submission]
  31. Longest Valid Parentheses
    [Problem] [My Answer] [Submission]
  32. Search in Rotated Sorted Array
    [Problem] [My Answer] [Submission]
  33. Find First and Last Position of Element in Sorted Array
    [Problem] [My Answer] [Submission]
  34. Search Insert Position
    [Problem] [My Answer] [Submission]
  35. Valid Sudoku
    [Problem] [My Answer] [Submission]
  36. Count and Say
    [Problem] [My Answer] [Submission]
  37. Combination Sum
    [Problem] [My Answer] [Submission]
  38. First Missing Positive
    [Problem] [My Answer] [Submission]
  39. Multiply Strings
    [Problem] [My Answer] [Submission]
  40. Wildcard Matching
    [Problem] [My Answer] [Submission]
  41. Permutations
    [Problem] [My Answer] [Submission]
  42. Rotate Image
    [Problem] [My Answer] [Submission]
  43. Group Anagrams
    [Problem] [My Answer] [Submission]
  44. My Power
    [Problem] [My Answer] [Submission]
  45. Maximum Sub-array
    [Problem] [My Answer] [Submission]
  46. Merge Intervals
    [Problem] [My Answer] [Submission]
  47. Length of Last Word
    [Problem] [My Answer] [Submission]
  48. Rotate List
    [Problem] [My Answer] [Submission]
  49. Plus One
    [Problem] [My Answer] [Submission]
  50. Add Binary
    [Problem] [My Answer] [Submission]
  51. Sqrt(x)
    [Problem] [My Answer] [Submission]
  52. Climbing Stairs
    [Problem] [My Answer] [Submission]
  53. Sort Colors
    [Problem] [My Answer] [Submission]
  54. Subsets
    [Problem] [My Answer] [Submission]
  55. Remove Duplicates from Sorted Array II
    [Problem] [My Answer] [Submission]
  56. Remove Duplicates from Sorted List
    [Problem] [My Answer] [Submission]
  57. Partition List
    [Problem] [My Answer] [Submission]
  58. Merge Sorted Array
    [Problem] [My Answer] [Submission]
  59. Reverse Linked List II
    [Problem] [My Answer] [Submission]
  60. Restore IP Addresses
    [Problem] [My Answer] [Submission]
  61. Validate Binary Search Tree
    [Problem] [My Answer] [Submission]
  62. Same Tree
    [Problem] [My Answer] [Submission]
  63. Symmetric Tree
    [Problem] [My Answer] [Submission]
  64. Binary Tree Level Order Traversal
    [Problem] [My Answer] [Submission]
  65. Binary Tree Zigzag Level Order Traversal
    [Problem] [My Answer] [Submission]
  66. Maximum Depth of Binary Tree
    [Problem] [My Answer] [Submission]
  67. Construct Binary Tree from Preorder and Inorder Traversal
    [Problem] [My Answer] [Submission]
  68. Binary Tree Level Order Traversal II
    [Problem] [My Answer] [Submission]
  69. Convert Sorted Array to Binary Search Tree
    [Problem] [My Answer] [Submission]
  70. Balanced Binary Tree
    [Problem] [My Answer] [Submission]
  71. Minimum Depth of Binary Tree
    [Problem] [My Answer] [Submission]
  72. Path Sum
    [Problem] [My Answer] [Submission]
  73. Flatten Binary Tree to Linked List
    [Problem] [My Answer] [Submission]
  74. Pascal's Triangle
    [Problem] [My Answer] [Submission]
  75. Pascal's Triangle II
    [Problem] [My Answer] [Submission]
  76. Triangle
    [Problem] [My Answer] [Submission]
  77. Best Time to Buy and Sell Stock
    [Problem] [My Answer] [Submission]
  78. Best Time to Buy and Sell Stock II
    [Problem] [My Answer] [Submission]
  79. Valid Palindrome
    [Problem] [My Answer] [Submission]
  80. Clone Graph
    [Problem] [My Answer] [Submission]
  81. Single Number
    [Problem] [My Answer] [Submission]
  82. Linked List Cycle
    [Problem] [My Answer] [Submission]
  83. LRU Cache
    [Problem] [My Answer] [Submission]
  84. Maximum Product Subarray
    [Problem] [My Answer] [Submission]
  85. Find Minimum in Rotated Sorted Array
    [Problem] [My Answer] [Submission]
  86. Min Stack
    [Problem] [My Answer] [Submission]
  87. Intersection of Two Linked Lists
    [Problem] [My Answer] [Submission]
  88. Two Sum II - Input array is sorted
    [Problem] [My Answer] [Submission]
  89. Majority Element
    [Problem] [My Answer] [Submission]
  90. Excel Sheet Column Number
    [Problem] [My Answer] [Submission]
  91. Factorial Trailing Zeroes
    [Problem] [My Answer] [Submission]
  92. Repeated DNA Sequence
    [Problem] [My Answer] [Submission]
  93. Rotate Array
    [Problem] [My Answer] [Submission]
  94. House Robber
    [Problem] [My Answer] [Submission]
  95. Reverse Linked List
    [Problem] [My Answer] [Submission]
  96. Course Schedule
    [Problem] [My Answer] [Submission]
  97. Search a 2D Matrix II
    [Problem] [My Answer] [Submission]
  98. Perfect Square
    [Problem] [My Answer] [Submission]
  99. Word Pattern
    [Problem] [My Answer] [Submission]
  100. Range Sum Query - Immutable
    [Problem] [My Answer] [Submission]
  101. Range Sum Query 2D - Immutable
    [Problem] [My Answer] [Submission]
  102. Coin Change
    [Problem] [My Answer] [Submission]
  103. Combination Sum IV
    [Problem] [My Answer] [Submission]
  104. LFU Cache
    [Problem] [My Answer] [Submission]
  105. Implement Rand10() Using Rand7()
    [Problem] [My Answer] [Submission]
  106. Next Greater Element I
    [Problem] [My Answer] [Submission]
  107. Reach a Number
    [Problem] [My Answer] [Submission]
  108. Buddy String
    [Problem] [My Answer] [Submission]
  109. Transpose Matrix
    [Problem] [My Answer] [Submission]

Database

  1. Combine two tables
    [Problem] [My Answer] [Submission]
  2. Second Highest Salary
    [Problem] [My Answer] [Submission]
  3. Nth Highest Salary
    [Problem] [My Answer] [Submission]
  4. Rank Scores
    [Problem] [My Answer] [Submission]
  5. Consecutive Numbers
    [Problem] [My Answer] [Submission]
  6. Employees Earning More Than Their Managers
    [Problem] [My Answer] [Submission]
  7. Duplicate email
    [Problem] [My Answer] [Submission]
  8. Customers Who Never Order
    [Problem] [My Answer] [Submission]
  9. Department Highest Salary
    [Problem] [My Answer] [Submission]
  10. Department Top Three Salary
    [Problem] [My Answer] [Submission]
  11. Delete Duplicate Emails
    [Problem] [My Answer] [Submission]
  12. Rising Temperature
    [Problem] [My Answer] [Submission]
  13. Trips and Users
    [Problem] [My Answer] [Submission]
  14. Big Countries
    [Problem] [My Answer] [Submission]
  15. More than 5 students
    [Problem] [My Answer] [Submission]
  16. Human Traffic of Stadium
    [Problem] [My Answer] [Submission]

Licence

GNU General Public Licence 3.0

Releases

No releases published

Packages

No packages published

Languages