Skip to content

wz30/Leetcode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

3beaae1 · Jul 24, 2024
Dec 10, 2019
Jul 10, 2017
Apr 6, 2021
Jul 11, 2017
May 13, 2020
Feb 20, 2020
May 7, 2019
Jul 12, 2017
Dec 29, 2020
Jul 11, 2017
May 26, 2019
Jul 12, 2017
Jun 11, 2019
Jul 11, 2017
Jun 16, 2019
Jul 12, 2017
Jun 16, 2019
Jun 16, 2019
Mar 4, 2020
Apr 30, 2020
Apr 20, 2022
Jul 12, 2017
Jul 1, 2019
Jul 3, 2019
Jul 13, 2017
Jul 9, 2019
Jul 13, 2017
Jul 12, 2017
Jul 28, 2019
Jul 28, 2019
Jul 31, 2019
Aug 4, 2019
Aug 11, 2019
Aug 11, 2019
Jul 14, 2017
Jul 14, 2017
Aug 29, 2019
Jun 6, 2019
Sep 9, 2019
May 25, 2018
Sep 30, 2019
Apr 6, 2020
Jul 14, 2017
Apr 21, 2020
Jan 12, 2022
Jul 7, 2017
Jul 31, 2020
May 3, 2022
Sep 28, 2021
Jul 14, 2017
Apr 20, 2022
May 23, 2019
Oct 22, 2019
Jul 19, 2017
Feb 26, 2020
Feb 27, 2020
Jun 19, 2019
Aug 12, 2020
Mar 10, 2022
Oct 11, 2020
Jun 5, 2019
Mar 17, 2022
Jul 25, 2020
Sep 27, 2021
May 12, 2020
Jul 26, 2019
Jul 22, 2021
May 12, 2020
Dec 8, 2021
Mar 30, 2020
Jul 26, 2020
Dec 18, 2021
Sep 4, 2019
Feb 24, 2022
Nov 15, 2020
Jun 19, 2019
Jun 15, 2019
Jul 14, 2017
Feb 26, 2020
Apr 2, 2020
Jun 6, 2019
Jul 13, 2021
Dec 6, 2021
May 1, 2020
Jan 3, 2021
Feb 26, 2022
Dec 10, 2019
Apr 9, 2020
May 8, 2020
Mar 8, 2022
Jun 6, 2019
Jan 8, 2022
May 25, 2018
Sep 3, 2019
Jun 19, 2019
Jul 20, 2017
Apr 24, 2020
May 13, 2019
Dec 6, 2021
Aug 16, 2020
Jul 22, 2020
Sep 5, 2019
Sep 6, 2019
Sep 6, 2019
Feb 26, 2022
May 16, 2020
Jul 11, 2019
Sep 13, 2020
Mar 12, 2022
Jul 15, 2017
Aug 17, 2020
May 7, 2019
Apr 12, 2020
May 23, 2019
Jan 21, 2020
Mar 10, 2020
Aug 6, 2019
Aug 3, 2019
Aug 3, 2019
Jul 22, 2020
Mar 11, 2019
Apr 20, 2022
Aug 2, 2020
Feb 24, 2022
Feb 22, 2022
Jul 21, 2021
Jun 12, 2019
May 21, 2019
Jun 26, 2019
Jun 15, 2019
Jan 6, 2022
Jul 21, 2020
Jul 20, 2020
Nov 5, 2019
Apr 23, 2020
May 26, 2019
Sep 5, 2019
Jul 26, 2019
Aug 9, 2019
Jul 26, 2019
Aug 4, 2019
May 21, 2019
Mar 31, 2019
Aug 1, 2017
Mar 31, 2020
Jun 17, 2021
Mar 19, 2019
May 15, 2019
Mar 7, 2020
Jul 24, 2024
May 13, 2019
May 20, 2019
Apr 20, 2022
Jul 23, 2020
Jun 7, 2019
Aug 7, 2019
May 24, 2019
Oct 1, 2020
May 1, 2019
May 3, 2020
May 30, 2019
May 26, 2019
Mar 10, 2020
Jun 15, 2019
Aug 4, 2019
Oct 29, 2020
Mar 31, 2019
Jun 15, 2019
Jul 23, 2020
Apr 7, 2020
May 8, 2019
May 20, 2019
Apr 13, 2020
Aug 1, 2020
Apr 20, 2022
Aug 16, 2020
May 13, 2019
Sep 13, 2019
Apr 19, 2020
Aug 8, 2019
Mar 30, 2022
Jul 12, 2021
Jun 15, 2019
Sep 3, 2020
May 3, 2020
Feb 19, 2022
Jan 10, 2022
Jul 23, 2020
May 7, 2020
Jul 26, 2017
Jun 16, 2019
Jul 11, 2021
Aug 12, 2017
Jun 9, 2019
Jun 9, 2019
Jun 9, 2019
Aug 7, 2017
Aug 7, 2017
Aug 9, 2017
Jul 19, 2020
Jun 4, 2019
Jan 12, 2022
May 8, 2020
Jan 10, 2022
Oct 22, 2019
May 20, 2019
May 27, 2019
Apr 18, 2019
Feb 25, 2022
Jul 25, 2019
Jan 17, 2020
Apr 13, 2020
May 29, 2019
Sep 30, 2020
Dec 18, 2019
Jan 7, 2022
May 12, 2020
Jun 11, 2019
Jun 11, 2019
May 29, 2019
May 21, 2019
Apr 20, 2022
Feb 16, 2021
Jun 4, 2019
Nov 4, 2020
Apr 13, 2020
May 8, 2020
Jul 24, 2021
Dec 11, 2019
Jul 30, 2019
Jul 22, 2021
Dec 18, 2019
Jun 11, 2019
Jul 22, 2020
Jun 19, 2019
Sep 18, 2019
May 24, 2019
Dec 16, 2019
Apr 24, 2019
Dec 11, 2021
Jul 25, 2021
Jul 18, 2020
May 5, 2020
May 5, 2020
Jul 24, 2019
Jul 10, 2017
Jan 20, 2020
Aug 15, 2020
Mar 13, 2020
Dec 4, 2021
Mar 2, 2020
May 21, 2019
Oct 13, 2021
Jul 16, 2019
Feb 18, 2020
Jul 22, 2021
Jul 16, 2019
Apr 24, 2020
May 4, 2017
May 4, 2017
Sep 19, 2019
Jul 31, 2020
Mar 10, 2020
May 21, 2019
Mar 19, 2019
Mar 28, 2019
May 8, 2019
Jul 22, 2020
Mar 7, 2021
Oct 6, 2020
Sep 3, 2020
May 7, 2020
Sep 12, 2020
Sep 15, 2020
Mar 19, 2020
Aug 23, 2020
May 26, 2019
Jul 13, 2021
Jul 27, 2019
Jul 27, 2019
Apr 15, 2020

Repository files navigation

Leetcode

The problem in leetcode in java version

counter [since 3/31/2020]

  • +5

leetcode number

  • 36 Valid Sudoku [incomplete].
  • 247 Strobogrammatic Number II [recursion(return each layer), time complexity?].
  • 248 Strobogrammatic Number III [recursion(though dp may make faster), time?].
  • 1186 Maximum Subarray Sum with One Deletion [O(n), dp(memory:O(1)), similar to maxium subarry]
  • 53 Maximum Subarray [O(n), dp(memory:O(1))]
  • 523 Continuous Subarray Sum [O(n^2), 1d dp(memory:O(n))]
    • Solution 1: sum[i, j] = dp[j] - dp[i]+arr[i] or
    • Solution 2: if a%k = c; b%k=c then(a-b)%k = 0(present it in hashmap)
  • 1208 Get Equal Substrings Within Budget [understand problem and sliding window O(n)]
  • 1209 Remove All Adjacent Duplicates in String II [stack unsolved and no edit yet....]
  • 348 Design Tic-Tac-Toe [check continous n in board or using two rwos?? O(n*n) -> O(n)]
  • 295 Find Median from Data Stream [two heaps(priority queue) O(lgn) to add number || balanced bst]
  • 871 Minimum Number of Refueling Stops [heaps || ? o-1 kanpsack bags]
  • 899 Orderly Queue [math and bubble sort || ? bfs tle]
  • 1353 Maximum Number of Events That Can Be Attended [sort(by ending time) + greedy | bst+bs(?)]
  • 1354 Construct Target Array With Multiple Sums [module, reverse or backtrack + maxheap]
  • 3 Longest Substring Without Repeating Characters [two pointer + hashmap(while loop)]
  • 159 Longest Substring with At Most Two Distinct Characters [two pointer + hashmap(for + while)]
  • 340 Longest Substring with At Most K Distinct Characters [same as 159]
  • 395 Longest Substring with At Least K Repeating Characters [divide and conquer(time?) | 2nd solution?]
  • 953 Verifying an Alien Dictionary [logic and corner case | pre for Alein dictionary]
  • 53 maximum subarray [greedy [O(n)] | divide and conquer ? how and time]
  • 122 Best Time to Buy and Sell Stock II [greedy + math(what is the minimal profit:MaxNum-MinNum)]
  • 678 Valid Parenthesis String [low and high two pointer to indicate the min and max left open bracket][or using recursion]
  • 468 Validate IP Address [regex | mix with regex, if else, for]
  • 829 Consecutive Numbers Sum [math problem (kx = ), | citadel OA 2020 ]
  • 606 Construct String from Binary Tree [build a tree with recursion and stack]
  • 205 Isomorphic Strings [map each character | convert string to number | Isomorphic] (7/12/2021)
  • 408 Valid Word Abbreviation [recursion | two pointers ?] (7/18/2021)
  • 605 Can Place Flowers [check and set | easy]
  • 674 Longest Continuous Increasing Subsequence [two pointers]
  • 670 Maximum Swap [hashmap: O(n^2)-> O(n)]
  • 983 Minimum Cost For Tickets [dp | dp[i] = dp[i+7] or dp[i+30] or dp[i+1] | dp[i] = dp[i-1] dp[i-7]]
  • 1522 Diameter of N-Ary Tree [recursion | great problem to practice height and depth recursively]

To do list

  • 755 Pour Water [related to trapping rain water]
  • alein dictionary [Topological sort: find cycle in graph | dfs backtrack?]
  • 289 game of life [in place array]
  • summary in [3,159,340,395]
  • divide and conquer [53]
  • 1163 Last Substring in Lexicographical Order: really make me upset
  • 1396 Design Underground System 【10/8/2020】

Amaazon interview

  • trapping rain water
  • 159 Longest Substring with At Most Two Distinct Characters (my interview 3/19) (round 1)
  • swap nodes in pairs (my interview 3/20) (round 4)
  • next challenges related to this problem[1249. Minimum Remove to Make Valid Parentheses]

Citadel

Problem Collections

  • 单调栈
  • jump game collections [array greedy
  • 连续数组之和 prefix sum (a%K+K)%K [523、525、560、974] [724, 713]

Tron inteerview

Onsite

  • 200 number of island (Feb 2020)

Always remember: no md, no accepted

  • when you do not want write the md, that equals you solve nothing.
  • However you are familiar with the problem, time will make you weak.

About

The problem in leetcode

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages