https://github.com/oluwxtope/grind-75
My solutions to Grind 75 questions from https://www.techinterviewhandbook.org/grind75
https://github.com/oluwxtope/grind-75
algorithms-and-data-structures grind-75 leetcode-python leetcode-solutions
Last synced: 7 months ago
JSON representation
My solutions to Grind 75 questions from https://www.techinterviewhandbook.org/grind75
- Host: GitHub
- URL: https://github.com/oluwxtope/grind-75
- Owner: Oluwxtope
- Created: 2022-06-06T20:10:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-28T20:17:12.000Z (over 3 years ago)
- Last Synced: 2025-04-06T04:11:36.304Z (8 months ago)
- Topics: algorithms-and-data-structures, grind-75, leetcode-python, leetcode-solutions
- Language: Python
- Homepage:
- Size: 70.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Grind 75
## Table of Contents
1. [Array](#1-array)
1. ~~[Two Sum](#1-two-sum)~~
2. ~~[Best Time to Buy and Sell Stock](#2-best-time-to-buy-and-sell-stock)~~
3. ~~[Majority Element](#3-majority-element)~~
4. ~~[Contains Duplicate](#4-contains-duplicate)~~
5. [Meeting Rooms](#5-meeting-rooms)
6. ~~[Move Zeroes](#6-move-zeroes)~~
7. [Squares of a Sorted Array](#7-squares-of-a-sorted-array)
8. ~~[Insert Interval](#8-insert-interval)~~
9. [3Sum](#9-3sum)
10. ~~[Product of Array Except Self](#10-product-of-array-except-self)~~
11. [Combination Sum](#11-combination-sum)
12. [Merge Intervals](#12-merge-intervals)
13. [Sort Colors](#13-sort-colors)
14. [Container With Most Water](#14-container-with-most-water)
15. [Gas Station](#15-gas-station)
16. [Longest Consecutive Sequence](#16-longest-consecutive-sequence)
17. [Rotate Array](#17-rotate-array)
18. [Contiguous Array](#18-contiguous-array)
19. [Subarray Sum Equals K](#19-subarray-sum-equals-k)
20. [Meeting Rooms II](#20-meeting-rooms-ii)
21. [3Sum Closest](#21-3sum-closest)
22. [Non-overlapping Intervals](#22-non-overlapping-intervals)
23. [Employee Free Time](#23-employee-free-time)
24. [Sliding Window Maximum](#24-sliding-window-maximum)
2. [Stack](#2-stack)
1. ~~[Valid Parentheses](#1-valid-parentheses)~~
2. [Implement Queue using Stacks](#2-implement-queue-using-stacks)
3. [Min Stack](#3-min-stack)
4. [Backspace String Compare](#4-backspace-string-compare)
5. [Evaluate Reverse Polish Notation](#5-evaluate-reverse-polish-notation)
6. [Daily Temperatures](#6-daily-temperatures)
7. [Decode String](#7-decode-string)
8. [Asteroid Collision](#8-asteroid-collision)
9. [Basic Calculator II](#9-basic-calculator-ii)
10. [Trapping Rain Water](#10-trapping-rain-water)
11. [Basic Calculator](#11-basic-calculator)
12. [Largest Rectangle in Histogram](#12-largest-rectangle-in-histogram)
13. [Maximum Frequency Stack](#13-maximum-frequency-stack)
14. [Longest Valid Parentheses](#14-longest-valid-parentheses)
3. [Linked List](#3-linked-list)
1. ~~[Merge Two Sorted Lists](#1-merge-two-sorted-lists)~~
2. [Linked List Cycle](#2-linked-list-cycle)
3. [Reverse Linked List](#3-reverse-linked-list)
4. [Middle of the Linked List](#4-middle-of-the-linked-list)
5. [Palindrome Linked List](#5-palindrome-linked-list)
6. [LRU Cache](#6-lru-cache)
7. [Remove Nth Node From End of List](#7-remove-nth-node-from-end-of-list)
8. [Swap Nodes in Pairs](#8-swap-nodes-in-pairs)
9. [Odd Even Linked List](#9-odd-even-linked-list)
10. [Add Two Numbers](#10-add-two-numbers)
11. [Sort List](#11-sort-list)
12. [Reorder List](#12-reorder-list)
13. [Rotate List](#13-rotate-list)
14. [Reverse Nodes in k-Group](#14-reverse-nodes-in-k-group)
4. [String](#4-string)
1. ~~[Valid Palindrome](#1-valid-palindrome)~~
2. ~~[Valid Anagram](#2-valid-anagram)~~
3. [Longest Palindrome](#3-longest-palindrome)
4. [Longest Common Prefix](#4-longest-common-prefix)
5. [Longest Substring Without Repeating Characters](#5-longest-substring-without-repeating-characters)
6. [String to Integer (atoi)](#6-string-to-integer-(atoi))
7. [Longest Palindromic Substring](#7-longest-palindromic-substring)
8. [Find All Anagrams in a String](#8-find-all-anagrams-in-a-string)
9. [Group Anagrams](#9-group-anagrams)
10. [Longest Repeating Character Replacement](#10-longest-repeating-character-replacement)
11. [Largest Number](#11-largest-number)
12. [Encode and Decode Strings](#12-encode-and-decode-strings)
13. [Minimum Window Substring](#13-minimum-window-substring)
14. [Palindrome Pairs](#14-palindrome-pairs)
5. [Binary Tree](#5-binary-tree)
1. [Invert Binary Tree](#1-invert-binary-tree)
2. [Balanced Binary Tree](#2-balanced-binary-tree)
3. [Diameter of Binary Tree](#3-diameter-of-binary-tree)
4. [Maximum Depth of Binary Tree](#4-maximum-depth-of-binary-tree)
5. [Same Tree](#5-same-tree)
6. [Symmetric Tree](#6-symmetric-tree)
7. [Subtree of Another Tree](#7-subtree-of-another-tree)
8. [Binary Tree Level Order Traversal](#8-binary-tree-level-order-traversal)
9. [Lowest Common Ancestor of a Binary Tree](#9-lowest-common-ancestor-of-a-binary-tree)
10. [Binary Tree Right Side View](#10-binary-tree-right-side-view)
11. [Construct Binary Tree from Preorder and Inorder Traversal](#11-construct-binary-tree-from-preorder-and-inorder-traversal)
12. [Path Sum II](#12-path-sum-ii)
13. [Maximum Width of Binary Tree](#13-maximum-width-of-binary-tree)
14. [Binary Tree Zigzag Level Order Traversal](#14-binary-tree-zigzag-level-order-traversal)
15. [Path Sum III](#15-path-sum-iii)
16. [All Nodes Distance K in Binary Tree](#16-all-nodes-distance-k-in-binary-tree)
17. [Serialize and Deserialize Binary Tree](#17-serialize-and-deserialize-binary-tree)
18. [Binary Tree Maximum Path Sum](#18-binary-tree-maximum-path-sum)
6. [Binary Search](#6-binary-search)
1. [Binary Search](#1-binary-search)
2. [First Bad Version](#2-first-bad-version)
3. [Search in Rotated Sorted Array](#3-search-in-rotated-sorted-array)
4. [Time Based Key-Value Store](#4-time-based-key-value-store)
5. [Search a 2D Matrix](#5-search-a-2d-matrix)
6. [Find Minimum in Rotated Sorted Array](#6-find-minimum-in-rotated-sorted-array)
7. [Maximum Profit in Job Scheduling](#7-maximum-profit-in-job-scheduling)
8. [Median of Two Sorted Arrays](#8-median-of-two-sorted-arrays)
7. [Graph](#7-graph)
1. [Flood Fill](#1-flood-fill)
2. [01 Matrix](#2-01-matrix)
3. [Clone Graph](#3-clone-graph)
4. [Course Schedule](#4-course-schedule)
5. [Number of Islands](#5-number-of-islands)
6. [Rotting Oranges](#6-rotting-oranges)
7. [Accounts Merge](#7-accounts-merge)
8. [Word Search](#8-word-search)
9. [Minimum Height Trees](#9-minimum-height-trees)
10. [Pacific Atlantic Water Flow](#10-pacific-atlantic-water-flow)
11. [Shortest Path to Get Food](#11-shortest-path-to-get-food)
12. [Graph Valid Tree](#12-graph-valid-tree)
13. [Course Schedule II](#13-course-schedule-ii)
14. [Number of Connected Components in an Undirected Graph](#14-number-of-connected-components-in-an-undirected-graph)
15. [Minimum Knight Moves](#15-minimum-knight-moves)
16. [Cheapest Flights Within K Stops](#16-cheapest-flights-within-k-stops)
17. [Word Ladder](#17-word-ladder)
18. [Longest Increasing Path in a Matrix](#18-longest-increasing-path-in-a-matrix)
19. [Word Search II](#19-word-search-ii)
20. [Alien Dictionary](#20-alien-dictionary)
21. [Bus Routes](#21-bus-routes)
8. [Dynamic Programming](#8-dynamic-programming)
1. [Maximum Subarray](#1-maximum-subarray)
2. [Climbing Stairs](#2-climbing-stairs)
3. [Coin Change](#3-coin-change)
4. [Partition Equal Subset Sum](#4-partition-equal-subset-sum)
5. [Unique Paths](#5-unique-paths)
6. [House Robber](#6-house-robber)
7. [Maximum Product Subarray](#7-maximum-product-subarray)
8. [Longest Increasing Subsequence](#8-longest-increasing-subsequence)
9. [Jump Game](#9-jump-game)
10. [Maximal Square](#10-maximal-square)
11. [Decode Ways](#11-decode-ways)
12. [Combination Sum IV](#12-combination-sum-iv)
9. [Binary Search Tree](#9-binary-search-tree)
1. [Lowest Common Ancestor of a Binary Search Tree](#1-lowest-common-ancestor-of-a-binary-search-tree)
2. [Convert Sorted Array to Binary Search Tree](#2-convert-sorted-array-to-binary-search-tree)
3. [Validate Binary Search Tree](#3-validate-binary-search-tree)
4. [Kth Smallest Element in a BST](#4-kth-smallest-element-in-a-bst)
5. [Inorder Successor in BST](#5-inorder-successor-in-bst)
10. [Hash Table](#10-hash-table)
1. [Ransom Note](#1-ransom-note)
2. [Insert Delete GetRandom O(1)](#2-insert-delete-getrandom-o(1))
3. [First Missing Positive](#3-first-missing-positive)
11. [Binary](#11-binary)
1. [Add Binary](#1-add-binary)
2. [Counting Bits](#2-counting-bits)
3. [Number of 1 Bits](#3-number-of-1-bits)
4. [Single Number](#4-single-number)
5. [Missing Number](#5-missing-number)
6. [Reverse Bits](#6-reverse-bits)
7. [Find the Duplicate Number](#7-find-the-duplicate-number)
12. [Math](#12-math)
1. [Roman to Integer](#1-roman-to-integer)
2. [Palindrome Number](#2-palindrome-number)
3. [Random Pick with Weight](#3-random-pick-with-weight)
4. [Pow(x, n)](#4-pow(x,-n))
5. [Reverse Integer](#5-reverse-integer)
13. [Heap](#13-heap)
1. [K Closest Points to Origin](#1-k-closest-points-to-origin)
2. [Task Scheduler](#2-task-scheduler)
3. [Top K Frequent Words](#3-top-k-frequent-words)
4. [Find K Closest Elements](#4-find-k-closest-elements)
5. [Kth Largest Element in an Array](#5-kth-largest-element-in-an-array)
6. [Find Median from Data Stream](#6-find-median-from-data-stream)
7. [Merge k Sorted Lists](#7-merge-k-sorted-lists)
8. [Smallest Range Covering Elements from K Lists](#8-smallest-range-covering-elements-from-k-lists)
14. [Trie](#14-trie)
1. [Implement Trie (Prefix Tree)](#1-implement-trie-(prefix-tree))
2. [Word Break](#2-word-break)
3. [Design Add and Search Words Data Structure](#3-design-add-and-search-words-data-structure)
4. [Design In-Memory File System](#4-design-in-memory-file-system)
15. [Recursion](#15-recursion)
1. [Permutations](#1-permutations)
2. [Subsets](#2-subsets)
3. [Letter Combinations of a Phone Number](#3-letter-combinations-of-a-phone-number)
4. [Next Permutation](#4-next-permutation)
5. [Generate Parentheses](#5-generate-parentheses)
6. [N-Queens](#6-n-queens)
16. [Matrix](#16-matrix)
1. [Spiral Matrix](#1-spiral-matrix)
2. [Valid Sudoku](#2-valid-sudoku)
3. [Rotate Image](#3-rotate-image)
4. [Set Matrix Zeroes](#4-set-matrix-zeroes)
5. [Sudoku Solver](#5-sudoku-solver)
17. [Queue](#17-queue)
1. [Design Hit Counter](#1-design-hit-counter)
1. [Two Sum](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/1-two-sum.py)
> [Leetcode](https://leetcode.com/problems/two-sum/)
Initialize hashmap with element as key and index as value. Iterate through array checking if target number minus current element in hashmap. If yes, return indexes of both elements from hashmap
2. [Best Time to Buy and Sell Stock](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/2-best-time-to-buy-and-sell-stock.py)
> [Leetcode](https://leetcode.com/problems/best-time-to-buy-and-sell-stock/)
Use sliding window to keep track of start index and end = start + 1 index. Keep track of max and current profit starting at 0. If end - start less than 0, update start to end and end to start + 1. Else, if end - start > max profit, update max profit and move end to next element.
3. [Majority Element](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/3-majority-element.py)
> [Leetcode](https://leetcode.com/problems/majority-element/)
Use hashmap to keep count of how many times an element appears in array, then iterate over hashmap and return element with a count > ceiling(n/2)
More optimal solution would be using the Boyer-Moore algorithm. Initialize count to 0 and potential candidate to first element in array. Then increment or decrement count by iterating through the array and seeing if potential candidate is present or not. Once count reaches 0, change potential candidate to be present element. Return potential candidate left.
4. [Contains Duplicate](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/4-contains-duplicate.py)
> [Leetcode](https://leetcode.com/problems/contains-duplicate/)
Use hashmap to keep count of how many times an element appears while iterating through the array. If current element already in hashmap, return true. If loop concludes, return false as no duplicate elements.
5. Meeting Rooms
> [Leetcode](https://leetcode.com/problems/meeting-rooms/)
*Premium leetcode required, didn't solve*
6. [Move Zeroes](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/6-move-zeroes.py)
> [Leetcode](https://leetcode.com/problems/move-zeroes/)
Use 2 pointers starting from indices 0 and 1. 3 scenarios possible: both pointers = 0, move right one until find nonzero then swap; left pointer at 0 and right at nonzero, swap. left pointer at nonzero and right at zero, move both pointers 1 down array.
7. [Squares of a Sorted Array](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/squares-of-a-sorted-array/)
Yet to solve
8. [Insert Interval](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/8-insert-interval.py)
> [Leetcode](https://leetcode.com/problems/insert-interval/)
Create an array to store result. Iterate through intervals and check for 3 scenarios: if last num in new interval less than first num in curr element, append new interval and return result + rest of intervals; if first num in new interval greater than last num in curr element, append curr element; if none of the above, there is overlap thus update new interval numbers and continue iterating. at the end, append new interval and return res (if new interval was inserted, result would have been returned in first scenario).
9. [3Sum](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/3sum/)
Yet to solve
10. [Product of Array Except Self](https://github.com/Oluwxtope/Grind-75/blob/main/1-arrays/10-product-of-array-except-self.py)
> [Leetcode](https://leetcode.com/problems/product-of-array-except-self/)
Initialize array to store results. Initialize prefix variable = 1. Start iterating through nums array and store the prefix in results array, then multiply prefix by current element before moving to next element. That way each index in the result array contains all numbers that came before that index in nums array multiplied. Repeat the same backwards with postfix that stores the suffix of numbers that came after the element. Return results array.
11. [Combination Sum](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/combination-sum/)
Yet to solve
12. [Merge Intervals](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/merge-intervals/)
Yet to solve
13. [Sort Colors](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/sort-colors/)
Yet to solve
14. [Container With Most Water](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/container-with-most-water/)
Yet to solve
15. [Gas Station](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/gas-station/)
Yet to solve
16. [Longest Consecutive Sequence](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-consecutive-sequence/)
Yet to solve
17. [Rotate Array](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/rotate-array/)
Yet to solve
18. [Contiguous Array](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/contiguous-array/)
Yet to solve
19. [Subarray Sum Equals K](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/subarray-sum-equals-k/)
Yet to solve
20. [Meeting Rooms II](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/meeting-rooms-ii/)
Yet to solve
21. [3Sum Closest](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/3sum-closest/)
Yet to solve
22. [Non-overlapping Intervals](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/non-overlapping-intervals/)
Yet to solve
23. [Employee Free Time](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/employee-free-time/)
Yet to solve
24. [Sliding Window Maximum](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/sliding-window-maximum/)
Yet to solve
1. [Valid Parentheses](https://github.com/Oluwxtope/Grind-75/blob/main/2-stack/1-valid-parentheses.py)
> [Leetcode](https://leetcode.com/problems/valid-parentheses/)
Intialize hashmap matching all types of open brackets as keys to closing brackets as values. Then intialize stack adt using array, pushing opening brackets and only popping last one when you encounter a matching closing bracket. If array is empty, then all matching brackets are positioned in valid locations.
2. [Implement Queue using Stacks](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/implement-queue-using-stacks/)
Yet to solve
3. [Min Stack](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/min-stack/)
Yet to solve
4. [Backspace String Compare](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/backspace-string-compare/)
Yet to solve
5. [Evaluate Reverse Polish Notation](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/evaluate-reverse-polish-notation/)
Yet to solve
6. [Daily Temperatures](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/daily-temperatures/)
Yet to solve
7. [Decode String](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/decode-string/)
Yet to solve
8. [Asteroid Collision](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/asteroid-collision/)
Yet to solve
9. [Basic Calculator II](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/basic-calculator-ii/)
Yet to solve
10. [Trapping Rain Water](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/trapping-rain-water/)
Yet to solve
11. [Basic Calculator](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/basic-calculator/)
Yet to solve
12. [Largest Rectangle in Histogram](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/largest-rectangle-in-histogram/)
Yet to solve
13. [Maximum Frequency Stack](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximum-frequency-stack/)
Yet to solve
14. [Longest Valid Parentheses](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-valid-parentheses/)
Yet to solve
1. [Merge Two Sorted Lists](https://github.com/Oluwxtope/Grind-75/blob/main/3-linked-list/1-merge-two-sorted-lists.py)
> [Leetcode](https://leetcode.com/problems/merge-two-sorted-lists/)
Initialize linkedlist called new and let a variable called prev point to it. Start while loop that checks if both lists 1 and 2 are not empty. 2 scenarios: val of curr node in list 1 less than that of 2 so let the next node of new be curr node of l1, and move to next node of l1; else, do the same for l2. Then set prev to next node of new and repeat. At end of loop, let prev.next equal to the non-empty list and return new.next as new.val is 0 and we started by changing new.next.
2. [Linked List Cycle](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/linked-list-cycle/)
Yet to solve
3. [Reverse Linked List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/reverse-linked-list/)
Yet to solve
4. [Middle of the Linked List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/middle-of-the-linked-list/)
Yet to solve
5. [Palindrome Linked List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/palindrome-linked-list/)
Yet to solve
6. [LRU Cache](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/lru-cache/)
Yet to solve
7. [Remove Nth Node From End of List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/remove-nth-node-from-end-of-list/)
Yet to solve
8. [Swap Nodes in Pairs](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/swap-nodes-in-pairs/)
Yet to solve
9. [Odd Even Linked List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/odd-even-linked-list/)
Yet to solve
10. [Add Two Numbers](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/add-two-numbers/)
Yet to solve
11. [Sort List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/sort-list/)
Yet to solve
12. [Reorder List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/reorder-list/)
Yet to solve
13. [Rotate List](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/rotate-list/)
Yet to solve
14. [Reverse Nodes in k-Group](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/reverse-nodes-in-k-group/)
Yet to solve
1. [Valid Palindrome](https://github.com/Oluwxtope/Grind-75/blob/main/4-string/1-valid-palindrome.py)
> [Leetcode](https://leetcode.com/problems/valid-palindrome/)
Initalize start and end pointers on the array moving in opposite directions. If start and end pointing to alnum characters, check if they're equal (apply lowercase method) and return false if not else move pointers. If a pointer not pointing to alnum char, move the pointer. If loop finishes running, return true.
2. [Valid Anagram](https://github.com/Oluwxtope/Grind-75/blob/main/4-string/2-valid-anagram.py)
> [Leetcode](https://leetcode.com/problems/valid-anagram/)
Initialize hash map to keep track of count of letters in first string, repeat for second string. Then iterate through both hash maps checking if a char is present in one and not the other or if count of characters in one not equal to count in other and return false. if all loops finish running, return true.
3. [Longest Palindrome](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-palindrome/)
Yet to solve
4. [Longest Common Prefix](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-common-prefix/)
Yet to solve
5. [Longest Substring Without Repeating Characters](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-substring-without-repeating-characters/)
Yet to solve
6. [String to Integer (atoi)](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/string-to-integer-(atoi)/)
Yet to solve
7. [Longest Palindromic Substring](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-palindromic-substring/)
Yet to solve
8. [Find All Anagrams in a String](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/find-all-anagrams-in-a-string/)
Yet to solve
9. [Group Anagrams](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/group-anagrams/)
Yet to solve
10. [Longest Repeating Character Replacement](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-repeating-character-replacement/)
Yet to solve
11. [Largest Number](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/largest-number/)
Yet to solve
12. [Encode and Decode Strings](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/encode-and-decode-strings/)
Yet to solve
13. [Minimum Window Substring](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/minimum-window-substring/)
Yet to solve
14. [Palindrome Pairs](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/palindrome-pairs/)
Yet to solve
1. [Invert Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/invert-binary-tree/)
Yet to solve
2. [Balanced Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/balanced-binary-tree/)
Yet to solve
3. [Diameter of Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/diameter-of-binary-tree/)
Yet to solve
4. [Maximum Depth of Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximum-depth-of-binary-tree/)
Yet to solve
5. [Same Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/same-tree/)
Yet to solve
6. [Symmetric Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/symmetric-tree/)
Yet to solve
7. [Subtree of Another Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/subtree-of-another-tree/)
Yet to solve
8. [Binary Tree Level Order Traversal](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/binary-tree-level-order-traversal/)
Yet to solve
9. [Lowest Common Ancestor of a Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree/)
Yet to solve
10. [Binary Tree Right Side View](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/binary-tree-right-side-view/)
Yet to solve
11. [Construct Binary Tree from Preorder and Inorder Traversal](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/)
Yet to solve
12. [Path Sum II](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/path-sum-ii/)
Yet to solve
13. [Maximum Width of Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximum-width-of-binary-tree/)
Yet to solve
14. [Binary Tree Zigzag Level Order Traversal](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal/)
Yet to solve
15. [Path Sum III](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/path-sum-iii/)
Yet to solve
16. [All Nodes Distance K in Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree/)
Yet to solve
17. [Serialize and Deserialize Binary Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/serialize-and-deserialize-binary-tree/)
Yet to solve
18. [Binary Tree Maximum Path Sum](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/binary-tree-maximum-path-sum/)
Yet to solve
1. [Binary Search](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/binary-search/)
Yet to solve
2. [First Bad Version](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/first-bad-version/)
Yet to solve
3. [Search in Rotated Sorted Array](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/search-in-rotated-sorted-array/)
Yet to solve
4. [Time Based Key-Value Store](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/time-based-key-value-store/)
Yet to solve
5. [Search a 2D Matrix](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/search-a-2d-matrix/)
Yet to solve
6. [Find Minimum in Rotated Sorted Array](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/)
Yet to solve
7. [Maximum Profit in Job Scheduling](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximum-profit-in-job-scheduling/)
Yet to solve
8. [Median of Two Sorted Arrays](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/median-of-two-sorted-arrays/)
Yet to solve
1. [Flood Fill](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/flood-fill/)
Yet to solve
2. [01 Matrix](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/01-matrix/)
Yet to solve
3. [Clone Graph](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/clone-graph/)
Yet to solve
4. [Course Schedule](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/course-schedule/)
Yet to solve
5. [Number of Islands](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/number-of-islands/)
Yet to solve
6. [Rotting Oranges](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/rotting-oranges/)
Yet to solve
7. [Accounts Merge](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/accounts-merge/)
Yet to solve
8. [Word Search](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/word-search/)
Yet to solve
9. [Minimum Height Trees](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/minimum-height-trees/)
Yet to solve
10. [Pacific Atlantic Water Flow](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/pacific-atlantic-water-flow/)
Yet to solve
11. [Shortest Path to Get Food](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/shortest-path-to-get-food/)
Yet to solve
12. [Graph Valid Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/graph-valid-tree/)
Yet to solve
13. [Course Schedule II](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/course-schedule-ii/)
Yet to solve
14. [Number of Connected Components in an Undirected Graph](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/)
Yet to solve
15. [Minimum Knight Moves](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/minimum-knight-moves/)
Yet to solve
16. [Cheapest Flights Within K Stops](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/cheapest-flights-within-k-stops/)
Yet to solve
17. [Word Ladder](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/word-ladder/)
Yet to solve
18. [Longest Increasing Path in a Matrix](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-increasing-path-in-a-matrix/)
Yet to solve
19. [Word Search II](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/word-search-ii/)
Yet to solve
20. [Alien Dictionary](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/alien-dictionary/)
Yet to solve
21. [Bus Routes](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/bus-routes/)
Yet to solve
1. [Maximum Subarray](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximum-subarray/)
Yet to solve
2. [Climbing Stairs](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/climbing-stairs/)
Yet to solve
3. [Coin Change](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/coin-change/)
Yet to solve
4. [Partition Equal Subset Sum](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/partition-equal-subset-sum/)
Yet to solve
5. [Unique Paths](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/unique-paths/)
Yet to solve
6. [House Robber](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/house-robber/)
Yet to solve
7. [Maximum Product Subarray](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximum-product-subarray/)
Yet to solve
8. [Longest Increasing Subsequence](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/longest-increasing-subsequence/)
Yet to solve
9. [Jump Game](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/jump-game/)
Yet to solve
10. [Maximal Square](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/maximal-square/)
Yet to solve
11. [Decode Ways](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/decode-ways/)
Yet to solve
12. [Combination Sum IV](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/combination-sum-iv/)
Yet to solve
1. [Lowest Common Ancestor of a Binary Search Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/)
Yet to solve
2. [Convert Sorted Array to Binary Search Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/)
Yet to solve
3. [Validate Binary Search Tree](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/validate-binary-search-tree/)
Yet to solve
4. [Kth Smallest Element in a BST](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/kth-smallest-element-in-a-bst/)
Yet to solve
5. [Inorder Successor in BST](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/inorder-successor-in-bst/)
Yet to solve
1. [Ransom Note](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/ransom-note/)
Yet to solve
2. [Insert Delete GetRandom O(1)](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/insert-delete-getrandom-o(1)/)
Yet to solve
3. [First Missing Positive](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/first-missing-positive/)
Yet to solve
1. [Add Binary](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/add-binary/)
Yet to solve
2. [Counting Bits](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/counting-bits/)
Yet to solve
3. [Number of 1 Bits](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/number-of-1-bits/)
Yet to solve
4. [Single Number](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/single-number/)
Yet to solve
5. [Missing Number](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/missing-number/)
Yet to solve
6. [Reverse Bits](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/reverse-bits/)
Yet to solve
7. [Find the Duplicate Number](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/find-the-duplicate-number/)
Yet to solve
1. [Roman to Integer](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/roman-to-integer/)
Yet to solve
2. [Palindrome Number](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/palindrome-number/)
Yet to solve
3. [Random Pick with Weight](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/random-pick-with-weight/)
Yet to solve
4. [Pow(x, n)](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/pow(x,-n)/)
Yet to solve
5. [Reverse Integer](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/reverse-integer/)
Yet to solve
1. [K Closest Points to Origin](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/k-closest-points-to-origin/)
Yet to solve
2. [Task Scheduler](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/task-scheduler/)
Yet to solve
3. [Top K Frequent Words](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/top-k-frequent-words/)
Yet to solve
4. [Find K Closest Elements](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/find-k-closest-elements/)
Yet to solve
5. [Kth Largest Element in an Array](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/kth-largest-element-in-an-array/)
Yet to solve
6. [Find Median from Data Stream](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/find-median-from-data-stream/)
Yet to solve
7. [Merge k Sorted Lists](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/merge-k-sorted-lists/)
Yet to solve
8. [Smallest Range Covering Elements from K Lists](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/smallest-range-covering-elements-from-k-lists/)
Yet to solve
1. [Implement Trie (Prefix Tree)](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/implement-trie-(prefix-tree)/)
Yet to solve
2. [Word Break](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/word-break/)
Yet to solve
3. [Design Add and Search Words Data Structure](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/design-add-and-search-words-data-structure/)
Yet to solve
4. [Design In-Memory File System](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/design-in-memory-file-system/)
Yet to solve
1. [Permutations](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/permutations/)
Yet to solve
2. [Subsets](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/subsets/)
Yet to solve
3. [Letter Combinations of a Phone Number](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/letter-combinations-of-a-phone-number/)
Yet to solve
4. [Next Permutation](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/next-permutation/)
Yet to solve
5. [Generate Parentheses](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/generate-parentheses/)
Yet to solve
6. [N-Queens](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/n-queens/)
Yet to solve
1. [Spiral Matrix](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/spiral-matrix/)
Yet to solve
2. [Valid Sudoku](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/valid-sudoku/)
Yet to solve
3. [Rotate Image](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/rotate-image/)
Yet to solve
4. [Set Matrix Zeroes](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/set-matrix-zeroes/)
Yet to solve
5. [Sudoku Solver](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/sudoku-solver/)
Yet to solve
1. [Design Hit Counter](https://github.com/Oluwxtope/Grind-75/blob/main/)
> [Leetcode](https://leetcode.com/problems/design-hit-counter/)
Yet to solve