Skip to content

sendelufa/JavaKeyframesProblems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

This project stores the results of brainstorming sessions solving problems at Leetcode

📅 Check out the calendar for the next session calendar

💬 Join our telegram group Java KeyFrames

Coding sessions:

Date Task Solution
23.06.2022 🟡 2. Add Two Numbers solution
30.06.2022 🟢 217. Contains Duplicate solution
30.06.2022 🟢 234. Palindrome Linked List solution
30.06.2022 🟢 303. Range Sum Query - Immutable solution
07.07.2022 🟡 48. Rotate Image solution
15.07.2022 🟢 206. Reverse Linked List solution
15.07.2022 🟢 278. First Bad Version solution
21.07.2022 🟢 724. Find Pivot Index solution
01.09.2022 🟢 198. House Robber solution
13.10.2022 🟡 238. Product of Array Except Self solution
20.10.2022 🟡 287. Find the Duplicate Number solution
27.10.2022 🟡 79. Word Search solution
03.11.2022 🟡 784. Letter Case Permutation solution
17.11.2022 🟢 338. Counting Bits solution
17.11.2022 🟢 338. Counting Bits solution
09.03.2023 🔴 Яндекс.Контест 30. НОП с восстановлением ответа solution
23.03.2023 🟡 19. Remove Nth Node From End of List solution
27.04.2023 🟡 91. Decode Ways solution

Tips

If input array is sorted then

  • Binary search
  • Two pointers

If asked for all permutations/subsets then

  • Backtracking

If given a tree then

  • DFS
  • BFS

If given a graph then

  • DFS
  • BFS

If given a linked list then

  • Two pointers

If recursion is banned then

  • Stack

If must solve in-place then

  • Swap corresponding values
  • Store one or more different values in the same pointer

If asked for maximum/minimum subarray/subset/options then

  • Dynamic programming

If asked for top/least K items then

  • Heap

If asked for common strings then

  • Map
  • Trie

Else

  • Map/Set for O(1) time & O(n) space
  • Sort input for O(nlogn) time and O(1) space

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages