DSA Flashcards
Contains Duplicate
Arrays & Hashing
Valid Anagram
Arrays & Hashing
Two Sum
Arrays & Hashing
Group Anagrams
Arrays & Hashing
charCodeAt()
Array.toString()
alphabet has 26 letters
if key in object
for key in object: do something with object[key]
Top K Frequent Elements
Arrays & Hashing
Encode and Decode Strings
Arrays & Hashing
Product of Array Except Self
Arrays & Hashing
Valid Sudoku
Arrays & Hashing
Longest Consecutive Sequence
Arrays & Hashing
Valid Palindrome
Two Pointers
Container With Most Water
Two Pointers
Two Sum II Input Array Is Sorted
Two Pointers
3Sum
Two Pointers
Trapping Rain Water
Two Pointers
Evaluate Reverse Polish Notation
Stack
Generate Parentheses
Stack
Valid Parentheses
Stack
Min Stack
Stack
Daily Temperatures
Stack
Largest Rectangle In Histogram
Stack
Car Fleet
Stack
Search a 2D Matrix
Binary Search
Binary Search
Binary Search
Best Time to Buy And Sell Stock
Sliding Window
Reverse Linked List
Linked List
Merge Two Sorted Lists
Linked List
Reorder List
Linked List. Solution A add list to an array and then simply adjust pointers. Solution B. split linked list in half. Reverse the second half. Merged the linked lists (better space complexity). Both O(n) solutions
Remove Node From End of Linked List
Linked List. Need to use a dummy node and two pointers
Copy Linked List with Random Pointer
Linked List. Need to use Map. Need to remember map.set() map.get() for([key, value]
Invert Binary Tree
bfs
Maximum Depth of Binary Tree
dfs
Diameter of Binary Tree
Balanced Binary Tree
Same Tree