Skip to content

joch0a/coding-exercises

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to contribute?

If you have some interesting and instructive exercise solved on C# feel free to raise a pull request with the solution and the link of the problem.

Interview preparation

Solved common technical interview questions on C#

The idea of this repository is to walk through the most common exercises of the coding interviews to build a solid basis.

Status

Meaning Emoji
Solved
Pending
Review needed
Very instructive on the topic! ‼️

Most Common Excercises

Easy

Name Resource link Status
Nth Fibonacci https://leetcode.com/problems/fibonacci-number/
Two Number Sum https://leetcode.com/problems/two-sum/
Validate Subsequence https://leetcode.com/problems/is-subsequence/
Find closest value in BST https://www.geeksforgeeks.org/find-closest-element-binary-search-tree/
Path sum https://leetcode.com/problems/path-sum/
Maximum Depth of Binary Tree https://leetcode.com/problems/maximum-depth-of-binary-tree/
Binary Search https://www.geeksforgeeks.org/c-program-for-binary-search-recursive-and-iterative/
Find three largest numbers https://leetcode.com/problems/third-maximum-number/
Remove Duplicates from Sorted Array https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/727/
Rotate Array https://leetcode.com/problems/rotate-array/
Contains Duplicate https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/578/
Unique number https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/549/
Intersection of Two Arrays II https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/674/
Plus One https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/559/
Valid Sudoku https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/769/
Rotate image https://leetcode.com/explore/interview/card/top-interview-questions-easy/92/array/770/
Reverse String https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/879/
Reverse Integer https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/880/ ✅ Tricky condition
First Unique Character in a String https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/881/
Valid Anagram https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/882/
Valid Palindrome https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/883/
ATOI https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/884/ ✅ Annoying
StrStr https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/885/
Count And Say https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/886/
Longest common prefix https://leetcode.com/explore/interview/card/top-interview-questions-easy/127/strings/887/ ✅ Try 3&4 approach
Delete node in a linked list https://leetcode.com/explore/interview/card/top-interview-questions-easy/93/linked-list/553/ ✅ Try 3&4 approach
Best Time To Buy&Sell Stocks https://leetcode.com/explore/interview/card/top-interview-questions-easy/97/dynamic-programming/572 ✅ (DP Quite forced)
Climbing Stairs https://leetcode.com/explore/interview/card/top-interview-questions-easy/97/dynamic-programming/569/
House Robber https://leetcode.com/explore/interview/card/top-interview-questions-easy/97/dynamic-programming/576/
Reverse List https://leetcode.com/explore/interview/card/top-interview-questions-easy/93/linked-list/560/
Merge two sorted lists https://leetcode.com/explore/interview/card/top-interview-questions-easy/93/linked-list/771/ ✅ Instructive line to review!
Symmetric Tree https://leetcode.com/explore/interview/card/top-interview-questions-easy/94/trees/627/ ✅ It can be improved, try making a single while w/o lists
Detect cycle linked list ‼️ https://leetcode.com/explore/learn/card/linked-list/214/two-pointer-technique/1212/
Detect cycle linked list ‼️‼️‼️ https://leetcode.com/explore/learn/card/linked-list/214/two-pointer-technique/1214/ ✅ !!!!!!!
RemoveNthFromEnd https://leetcode.com/problems/remove-nth-node-from-end-of-list/
LinkedList Palindrome ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-easy/93/linked-list/772/
Level order trasversal https://leetcode.com/explore/interview/card/top-interview-questions-easy/94/trees/628/
Convert Sorted Array to Binary Search Tree https://leetcode.com/explore/interview/card/top-interview-questions-easy/94/trees/631/
Merge Two Sorted Array https://leetcode.com/explore/interview/card/top-interview-questions-easy/96/sorting-and-searching/587/
First bad version https://leetcode.com/problems/first-bad-version

Medium

Name Resource link Status
Number of islands ‼️ https://leetcode.com/problems/number-of-islands/ ✅ ❕
Three sum https://leetcode.com/problems/3sum/ ✅ ❕
Move Zeroes https://leetcode.com/problems/move-zeroes/
Monotonic array https://leetcode.com/problems/monotonic-array/
Spiral Matrix ‼️ https://leetcode.com/problems/spiral-matrix/
Longest peak https://leetcode.com/problems/longest-mountain-in-array/
BST Construction https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/
Validate BST https://leetcode.com/problems/validate-binary-search-tree/
Kadane's Algorithm ‼️ https://www.geeksforgeeks.org/largest-sum-contiguous-subarray/
Min Height Trees https://leetcode.com/problems/minimum-height-trees/
K�th Largest Element in BST https://practice.geeksforgeeks.org/problems/kth-largest-element-in-bst/1
Invert Binary tree https://leetcode.com/problems/invert-binary-tree/
Diameter of Binary tree ‼️ https://leetcode.com/problems/diameter-of-binary-tree/
ZigZag Ordering https://leetcode.com/explore/interview/card/top-interview-questions-medium/108/trees-and-graphs/787/
Populate right https://leetcode.com/explore/interview/card/top-interview-questions-medium/108/trees-and-graphs/789/
Group Anagrams https://leetcode.com/problems/group-anagrams/ ❕ Low perf
Longest Substring Without Repeating Characters ‼️ https://leetcode.com/problems/longest-substring-without-repeating-characters
Longest palindrome substring https://leetcode.com/problems/longest-palindromic-substring/
Increasing Triplet https://leetcode.com/explore/interview/card/top-interview-questions-medium/103/array-and-strings/781/
Add two numbers https://leetcode.com/problems/add-two-numbers/
Odd Even Linked List https://leetcode.com/problems/add-two-numbers/ ✅ (Revisit o(1) solution)
Intersection of Two Linked Lists ‼️ ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-medium/107/linked-list/785/
Letter Combinations of a Phone Number ‼️ ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-medium/109/backtracking/793/
Generate Parentheses https://leetcode.com/explore/interview/card/top-interview-questions-medium/109/backtracking/794/
Permutations https://leetcode.com/explore/interview/card/top-interview-questions-medium/109/backtracking/795/
Subsets https://leetcode.com/explore/interview/card/top-interview-questions-medium/109/backtracking/796/
Word Search https://leetcode.com/explore/interview/card/top-interview-questions-medium/109/backtracking/797/
Sort Colors ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/798/
Top K Frequent Elements ‼️‼️ https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/799/
Kth Largest Element in an Array https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/800/
Find Peak Element ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/801/
Search for a Range https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/802/
Merge Intervals https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/803/
Search in Rotated Sorted Array ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/804/
Search a 2D Matrix II https://leetcode.com/explore/interview/card/top-interview-questions-medium/110/sorting-and-searching/806/ ✅ Check divide and conquer sol
Jump Game https://leetcode.com/explore/interview/card/top-interview-questions-medium/111/dynamic-programming/807/
Unique Paths https://leetcode.com/explore/interview/card/top-interview-questions-medium/111/dynamic-programming/808/
Coin Change ‼️ https://leetcode.com/problems/coin-change/ ✅ ✅
Longest Increasing Subsequence https://leetcode.com/explore/interview/card/top-interview-questions-medium/111/dynamic-programming/810/
Coin Change 2 https://leetcode.com/problems/coin-change-2/
Max Subset Sum No Adjacent ‼️ https://www.geeksforgeeks.org/maximum-sum-such-that-no-two-elements-are-adjacent/
Levenshtein distance https://leetcode.com/problems/minimum-ascii-delete-sum-for-two-strings/ ✅ review it
All Paths From Source to Target https://leetcode.com/problems/all-paths-from-source-to-target/
Lowest Common Ancestor of a Binary Search Tree https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree/
Task Scheduler https://leetcode.com/problems/task-scheduler/
Course Schedule https://leetcode.com/problems/course-schedule/
Majority Element https://leetcode.com/problems/majority-element/solution/
Longest Common Subsequence https://leetcode.com/problems/longest-common-subsequence/ ✅ Most DP follows this pattern

Hard

Name Resource link Status
Product of Array Except Self https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/827/
Spiral Matrix https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/828/
4Sum II https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/829/
Container with most water https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/830/ ✅ EASY TO IMPLEMENT, HARD TO THINK
Game of life https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/831/
First missing positive https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/832/ ✅ Review https://www.youtube.com/watch?v=9SnkdYXNIzM&ab_channel=MichaelMuinos
Longest Consecutive Sequence https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/833/
Find the Duplicate Number https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/834/
Basic Calculator II https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/836/
Sliding Window Maximum ‼️ https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/837/
Minimum Window Substring https://leetcode.com/explore/interview/card/top-interview-questions-hard/116/array-and-strings/838/
Merge k Sorted Lists https://leetcode.com/explore/interview/card/top-interview-questions-hard/117/linked-list/839/ ✅ Revisit last approach
Sort List https://leetcode.com/explore/interview/card/top-interview-questions-hard/117/linked-list/840/
Copy list with random pointer https://leetcode.com/explore/interview/card/top-interview-questions-hard/117/linked-list/841/
Word Ladder ‼️ Double BFS & string encoding https://leetcode.com/problems/word-ladder
Binary Tree Maximum Path Sum https://leetcode.com/explore/interview/card/top-interview-questions-hard/118/trees-and-graphs/845/
Number of provinces https://leetcode.com/explore/interview/card/top-interview-questions-hard/118/trees-and-graphs/846/ ✅ Review UNION-FIND
Course Schelude https://leetcode.com/explore/interview/card/top-interview-questions-hard/118/trees-and-graphs/847/
Course Schelude II https://leetcode.com/explore/interview/card/top-interview-questions-hard/118/trees-and-graphs/848/
Critical Connections in a Network ‼️ ‼️ ‼️ https://leetcode.com/problems/critical-connections-in-a-network/ ✅ TARJAN'S ALGO
Max product https://leetcode.com/problems/maximum-product-subarray

Test skills

The following exercises were randomly picked it from LC to test what I've learnt so far

Easy

Name Resource link Status
Best Time to Buy and Sell Stock II https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/
Valid anagrams https://leetcode.com/problems/valid-anagram/
Add digits https://leetcode.com/problems/add-digits/submissions/
Largest Substring Between Two Equal Character https://leetcode.com/problems/largest-substring-between-two-equal-characters/
Count Binary Substrings https://leetcode.com/problems/count-binary-substrings/ ✅ (Kinda hard)
Minimum Changes To Make Alternating Binary String https://leetcode.com/problems/minimum-changes-to-make-alternating-binary-string/
Find the Difference https://leetcode.com/problems/find-the-difference/
Shortest completing word https://leetcode.com/problems/shortest-completing-word
Maximum Score After Splitting a String ‼️ https://leetcode.com/problems/maximum-score-after-splitting-a-string/
Find Common Characters https://leetcode.com/problems/find-common-characters/
Split a String in Balanced Strings https://leetcode.com/problems/split-a-string-in-balanced-strings/submissions/
Shuffle https://leetcode.com/problems/shuffle-the-array/

Medium

Name Resource link Status
Surrounded Regions https://leetcode.com/problems/surrounded-regions/
Deepest Leaves Sum https://leetcode.com/explore/challenge/card/april-leetcoding-challenge-2021/594/week-2-april-8th-april-14th/3704/

Hard

Name Resource link Status
Longest Increasing Path in a Matrix ‼️ https://leetcode.com/explore/challenge/card/april-leetcoding-challenge-2021/594/week-2-april-8th-april-14th/3703/

Complete study plan

The following excercise should be resolved WITHOUT looking to any solution based on previous ones.

Actual state 289/307 94.13%

Name Resource link Status
Longest Common Prefix https://leetcode.com/problems/longest-common-prefix
Unique Email Addresses https://leetcode.com/problems/unique-email-addresses
Fibonacci Number https://leetcode.com/problems/fibonacci-number
Majority Element https://leetcode.com/problems/majority-element
Path Sum https://leetcode.com/problems/path-sum
Add Binary https://leetcode.com/problems/add-binary
Intersection of Two Arrays https://leetcode.com/problems/intersection-of-two-arrays
Minimum Depth of Binary Tree https://leetcode.com/problems/minimum-depth-of-binary-tree
Remove Linked List Elements https://leetcode.com/problems/remove-linked-list-elements ✅ ❕ ✅
Plus One https://leetcode.com/problems/plus-one
Peak Index in a Mountain Array https://leetcode.com/problems/peak-index-in-a-mountain-array
Binary Tree Paths https://leetcode.com/problems/binary-tree-paths
Find Pivot Index https://leetcode.com/problems/find-pivot-index
Pascal's Triangle https://leetcode.com/problems/pascals-triangle
Remove Duplicates from Sorted List https://leetcode.com/problems/remove-duplicates-from-sorted-list
Sort Array By Parity https://leetcode.com/problems/sort-array-by-parity ✅ ❕ ✅
Word Pattern https://leetcode.com/problems/word-pattern
Convert Sorted Array to Binary Search Tree https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree
Rotate String ‼️ ‼️ https://leetcode.com/problems/rotate-string ❕ KMP
Fizz Buzz https://leetcode.com/problems/fizz-buzz
Symmetric Tree https://leetcode.com/problems/symmetric-tree
Remove Duplicates from Sorted Array https://leetcode.com/problems/remove-duplicates-from-sorted-array
First Unique Character in a String https://leetcode.com/problems/first-unique-character-in-a-string
Best Time to Buy and Sell Stock II https://leetcode.com/problems/best-time-to-buy-and-sell-stock-ii
Third Maximum Number https://leetcode.com/problems/third-maximum-number ✅ QUICKSELECT
Summary Ranges https://leetcode.com/problems/summary-ranges
Most Common Word https://leetcode.com/problems/most-common-word
Find All Numbers Disappeared in an Array ‼️ ‼️ https://leetcode.com/problems/find-all-numbers-disappeared-in-an-array ✅ Follow-ups
Palindrome Number https://leetcode.com/problems/palindrome-number ✅ ❕ follow up ✅
Reverse String II https://leetcode.com/problems/reverse-string-ii
Climbing Stairs https://leetcode.com/problems/climbing-stairs
Sqrt https://leetcode.com/problems/sqrtx ✅ annoying using long...
Two Sum II - Input array is sorted https://leetcode.com/problems/two-sum-ii-input-array-is-sorted
Diameter of Binary Tree https://leetcode.com/problems/diameter-of-binary-tree ✅ Review iterative
Implement Stack using Queues https://leetcode.com/problems/implement-stack-using-queues ✅ Review other solutions... weird problem
Number of 1 Bits https://leetcode.com/problems/number-of-1-bits ✅ ❕ bit manipulation
Balanced Binary Tree https://leetcode.com/problems/balanced-binary-tree ✅ ❕ ✅
Subtree of Another Tree https://leetcode.com/problems/subtree-of-another-tree
Valid Palindrome https://leetcode.com/problems/valid-palindrome
Move Zeroes https://leetcode.com/problems/move-zeroes
Smallest Range https://leetcode.com/problems/smallest-range-i/
Second Minimum Node In a Binary Tree https://leetcode.com/problems/second-minimum-node-in-a-binary-tree
Delete Node in a Linked List https://leetcode.com/problems/delete-node-in-a-linked-list
Implement strStr https://leetcode.com/problems/implement-strstr
Reverse Integer https://leetcode.com/problems/reverse-integer
Palindrome Linked List https://leetcode.com/problems/palindrome-linked-list
Min Stack https://leetcode.com/problems/min-stack ✅ ❕ (Just a little)
Implement Queue using Stacks https://leetcode.com/problems/implement-queue-using-stacks ✅ ❕ (Just a little)
Lowest Common Ancestor of a Binary Search Tree https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree
Factorial Trailing Zeroes https://leetcode.com/problems/factorial-trailing-zeroes ✅ ❕ Math
Valid Anagram https://leetcode.com/problems/valid-anagram
Reverse Words in a String III https://leetcode.com/problems/reverse-words-in-a-string-iii
Excel Sheet Column Number https://leetcode.com/problems/excel-sheet-column-number
Add Strings https://leetcode.com/problems/add-strings
Count Primes https://leetcode.com/problems/count-primes
Rectangle Overlap https://leetcode.com/problems/rectangle-overlap ✅ ❕ tricky
Reverse Only Letters https://leetcode.com/problems/reverse-only-letters
Binary Tree Inorder Traversal https://leetcode.com/problems/binary-tree-inorder-traversal
Linked List Cycle https://leetcode.com/problems/linked-list-cycle
Reverse String https://leetcode.com/problems/reverse-string
Intersection of Two Linked Lists https://leetcode.com/problems/intersection-of-two-linked-lists
Excel Sheet Column Title https://leetcode.com/problems/excel-sheet-column-title
Roman to Integer https://leetcode.com/problems/roman-to-integer
Merge Two Sorted Lists https://leetcode.com/problems/merge-two-sorted-lists ✅ ❕ ✅
Design HashMap https://leetcode.com/problems/design-hashmap
Best Time to Buy and Sell Stock https://leetcode.com/problems/best-time-to-buy-and-sell-stock
Valid Parentheses https://leetcode.com/problems/valid-parentheses ✅ ❕ mapping ✅
Reverse Linked List https://leetcode.com/problems/reverse-linked-list
Maximum Subarray https://leetcode.com/problems/maximum-subarray
Merge Sorted Array https://leetcode.com/problems/merge-sorted-array
Two Sum https://leetcode.com/problems/two-sum
Copy List with Random Pointer https://leetcode.com/problems/copy-list-with-random-pointer ✅ ❕ ✅ ❕ ✅
Reverse Words in a String https://leetcode.com/problems/reverse-words-in-a-string ✅ ✅
Remove K Digits https://leetcode.com/problems/remove-k-digits ✅ ❕ Mono stack ✅
Compare Version Numbers https://leetcode.com/problems/compare-version-numbers ❕ ✅
Binary Tree Zigzag Level Order Traversal https://leetcode.com/problems/binary-tree-zigzag-level-order-traversal
(SD) . Cache https://leetcode.com/problems/lru-cache/
Spiral Matrix https://leetcode.com/problems/spiral-matrix
Number of Islands https://leetcode.com/problems/number-of-islands
Add Two Numbers II https://leetcode.com/problems/add-two-numbers-ii
Add Two Numbers https://leetcode.com/problems/add-two-numbers ✅ ✅
String Compression https://leetcode.com/problems/string-compression
Valid Tic-Tac-Toe State https://leetcode.com/problems/valid-tic-tac-toe-state
Rotate Image https://leetcode.com/problems/rotate-image
String to Integer https://leetcode.com/problems/string-to-integer-atoi
Exclusive Time of Functions https://leetcode.com/problems/exclusive-time-of-functions ❕ ✅
Sort Colors https://leetcode.com/problems/sort-colors ❕ ✅
Remove Comments https://leetcode.com/problems/remove-comments ❕ ✅ ❕ order of conditions
Swap Nodes in Pairs https://leetcode.com/problems/swap-nodes-in-pairs ✅ ❕ follow-up ✅
Pacific Atlantic Water Flow https://leetcode.com/problems/pacific-atlantic-water-flow
Validate Binary Search Tree https://leetcode.com/problems/validate-binary-search-tree
Longest Palindromic Substring https://leetcode.com/problems/longest-palindromic-substring
Word Search https://leetcode.com/problems/word-search
Search a 2D Matrix II https://leetcode.com/problems/search-a-2d-matrix-ii
Find the Duplicate Number https://leetcode.com/problems/find-the-duplicate-number
Letter Combinations of a Phone Number https://leetcode.com/problems/letter-combinations-of-a-phone-number ✅ ✅
Majority Element II https://leetcode.com/problems/majority-element-ii ✅ ❕ voting ✅ ❕ last part
Delete Node in a BST https://leetcode.com/problems/delete-node-in-a-bst ✅ probably needs a review, kinda tricky
Next Permutation https://leetcode.com/problems/next-permutation ✅ ❕ ✅ good idea to train again
Coin Change https://leetcode.com/problems/coin-change ✅ ✅
Reverse Linked List II https://leetcode.com/problems/reverse-linked-list-ii
Minesweeper https://leetcode.com/problems/minesweeper
Trim a Binary Search Tree https://leetcode.com/problems/trim-a-binary-search-tree
Group Anagrams https://leetcode.com/problems/group-anagrams
Search in Rotated Sorted Array https://leetcode.com/problems/search-in-rotated-sorted-array
Serialize and Deserialize BST https://leetcode.com/problems/serialize-and-deserialize-bst
Multiply Strings https://leetcode.com/problems/multiply-strings ✅ ❕ ✅
Top K Frequent Words https://leetcode.com/problems/top-k-frequent-words
Implement Trie https://leetcode.com/problems/implement-trie-prefix-tree ✅ ❕ ✅
Populating Next Right Pointers in Each Node https://leetcode.com/problems/populating-next-right-pointers-in-each-node ✅ ❕ ✅
Longest Substring Without Repeating Characters https://leetcode.com/problems/longest-substring-without-repeating-characters ✅ ✅
Basic Calculator https://leetcode.com/problems/basic-calculator-ii
3Sum https://leetcode.com/problems/3sum ✅ ✅
Generate Parentheses https://leetcode.com/problems/generate-parentheses ✅ ✅
Rotate List https://leetcode.com/problems/rotate-list
Battleships in a Board https://leetcode.com/problems/battleships-in-a-board
Construct Binary Tree from Preorder and Inorder Traversal https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal ✅ ❕
Merge Intervals https://leetcode.com/problems/merge-intervals
Restore IP Addresses https://leetcode.com/problems/restore-ip-addresses/ ✅ ✅
Encode and Decode TinyURL https://leetcode.com/problems/encode-and-decode-tinyurl ✅ weird...
Minimum Path Sum https://leetcode.com/problems/minimum-path-sum
Binary Tree Level Order Traversal https://leetcode.com/problems/binary-tree-level-order-traversal
Longest Increasing Subsequence https://leetcode.com/problems/longest-increasing-subsequence ✅ MAYBE review the O(logN) low priority
Binary Search Tree Iterator https://leetcode.com/problems/binary-search-tree-iterator
Top K Frequent Elements https://leetcode.com/problems/top-k-frequent-elements
Gas Station https://leetcode.com/problems/gas-station ✅ ❕
Lowest Common Ancestor of a Binary Tree https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree ✅ ❕
Integer to Roman https://leetcode.com/problems/integer-to-roman
Knight Dialer https://leetcode.com/problems/knight-dialer ✅ ❕ ✅ ❕ ✅
Valid Sudoku https://leetcode.com/problems/valid-sudoku
Remove Nth Node From End of List https://leetcode.com/problems/remove-nth-node-from-end-of-list
Reorder List https://leetcode.com/problems/reorder-list
Shopping Offers https://leetcode.com/problems/shopping-offers ✅ ❕ ✅ ❕
Clone Graph https://leetcode.com/problems/clone-graph
. Cache https://leetcode.com/problems/lru-cache/ ✅ REVIEW LTE ✅
Populating Next Right Pointers in Each Node II https://leetcode.com/problems/populating-next-right-pointers-in-each-node-ii
Coin Change 2 https://leetcode.com/problems/coin-change-2 ✅ ❕ ✅ ❕ ✅
Find Peak Element https://leetcode.com/problems/find-peak-element ✅ Maybe see the MIT video
All Nodes Distance K in Binary Tree https://leetcode.com/problems/all-nodes-distance-k-in-binary-tree
Find Duplicate Subtrees https://leetcode.com/problems/find-duplicate-subtrees
Rectangle Area https://leetcode.com/problems/rectangle-area
Kth Largest Element in an Array https://leetcode.com/problems/kth-largest-element-in-an-array
Product of Array Except Self https://leetcode.com/problems/product-of-array-except-self
Simplify Path https://leetcode.com/problems/simplify-path
Container With Most Water https://leetcode.com/problems/container-with-most-water
Word Break https://leetcode.com/problems/word-break ✅ ❕ ✅
Decode String https://leetcode.com/problems/decode-string
Maximum Width of Binary Tree https://leetcode.com/problems/maximum-width-of-binary-tree
Count and Say https://leetcode.com/problems/count-and-say
Decode Ways https://leetcode.com/problems/decode-ways ✅ ❕ ✅ ❕ ✅ memo ftw
Search a 2D Matrix https://leetcode.com/problems/search-a-2d-matrix
Flatten Binary Tree to Linked List https://leetcode.com/problems/flatten-binary-tree-to-linked-list ✅ !!
Next Greater Element II ‼️ https://leetcode.com/problems/next-greater-element-ii ✅ ✅
Partition List https://leetcode.com/problems/partition-list
Set Matrix Zeroes https://leetcode.com/problems/set-matrix-zeroes ✅ ✅
Game of Life https://leetcode.com/problems/game-of-life
Evaluate Reverse Polish Notation https://leetcode.com/problems/evaluate-reverse-polish-notation
Binary Tree Right Side View https://leetcode.com/problems/binary-tree-right-side-view
Print Binary Tree https://leetcode.com/problems/print-binary-tree
Knight Probability in Chessboard https://leetcode.com/problems/knight-probability-in-chessboard ✅ ✅
Letter Case Permutation https://leetcode.com/problems/letter-case-permutation
Longest Palindromic Subsequence https://leetcode.com/problems/longest-palindromic-subsequence ✅ ✅
Continuous Subarray Sum https://leetcode.com/problems/continuous-subarray-sum ✅ ✅ ❕
Rotate Array https://leetcode.com/problems/rotate-array
Odd Even Linked List https://leetcode.com/problems/odd-even-linked-list
Shuffle an Array https://leetcode.com/problems/shuffle-an-array ✅ Shitty one :), cool random
Course Schedule II https://leetcode.com/problems/course-schedule-ii ✅ Always review this kind of ex
Find All Duplicates in an Array https://leetcode.com/problems/find-all-duplicates-in-an-array
Permutations https://leetcode.com/problems/permutations
Jump Game https://leetcode.com/problems/jump-game
My Calendar https://leetcode.com/problems/my-calendar-i ✅ Review Better solution
Remove Duplicate Letters ‼️‼️‼️ https://leetcode.com/problems/remove-duplicate-letters
Spiral Matrix https://leetcode.com/problems/spiral-matrix-ii
Combination Sum https://leetcode.com/problems/combination-sum
Linked List Cycle II https://leetcode.com/problems/linked-list-cycle-ii
Smallest Element in a Sorted Matrix https://leetcode.com/problems/kth-smallest-element-in-a-sorted-matrix ✅ Review binary search
Valid Triangle Number https://leetcode.com/problems/valid-triangle-number ✅ ✅ ❕
Convert Sorted List to Binary Search Tree https://leetcode.com/problems/convert-sorted-list-to-binary-search-tree
Kth Smallest Element in a BST https://leetcode.com/problems/kth-smallest-element-in-a-bst
Pow https://leetcode.com/problems/powx-n ✅ Meeeeeeeeeeeeeeeeeeeeeeeeeeeh
Max Area of Island https://leetcode.com/problems/max-area-of-island
Check Completeness of a Binary Tree https://leetcode.com/problems/check-completeness-of-a-binary-tree
Peeking Iterator https://leetcode.com/problems/peeking-iterator ✅ MEH
Construct Binary Tree from Inorder and Postorder Traversal https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal
Subarray Sum Equals K https://leetcode.com/problems/subarray-sum-equals-k ✅ Instructive way of prefix sum
Cheapest Flights Within K Stops https://leetcode.com/problems/cheapest-flights-within-k-stops ✅ ✅
Search in Rotated Sorted Array II https://leetcode.com/problems/search-in-rotated-sorted-array-ii ✅ MUST REVIEW, quite instructive
Find K Pairs with Smallest Sums https://leetcode.com/problems/find-k-pairs-with-smallest-sums ✅ ❕
Range Sum Query 2D - Immutable ‼️ https://leetcode.com/problems/range-sum-query-2d-immutable ✅ REVIEW, INSTRUCTIVE PREFIX CALCULATION
Palindromic Substrings https://leetcode.com/problems/palindromic-substrings ✅ interesting
Interleaving String https://leetcode.com/problems/interleaving-string ✅ MAY review tabulation
Distribute Coins in Binary Tree https://leetcode.com/problems/distribute-coins-in-binary-tree ✅ REVIEW
Random Pick with Weight https://leetcode.com/problems/random-pick-with-weight ✅ Weird...
Design Linked List https://leetcode.com/problems/design-linked-list
Combination Sum II https://leetcode.com/problems/combination-sum-ii
Combination Sum III https://leetcode.com/problems/combination-sum-iii
Find K Closest Elements https://leetcode.com/problems/find-k-closest-elements ✅ REVIEW
Is Graph Bipartite? https://leetcode.com/problems/is-graph-bipartite
Friend Circles https://leetcode.com/problems/friend-circles
Maximum Product Subarray https://leetcode.com/problems/maximum-product-subarray ✅ REVIEW
Find Minimum in Rotated Sorted Array https://leetcode.com/problems/find-minimum-in-rotated-sorted-array
Sort Characters By Frequency https://leetcode.com/problems/sort-characters-by-frequency
Course Schedule https://leetcode.com/problems/course-schedule
Reconstruct Itinerary https://leetcode.com/problems/reconstruct-itinerary ✅ ❕
Partition Equal Subset Sum https://leetcode.com/problems/partition-equal-subset-sum ✅ ALMOST aced. review it
Maximal Square https://leetcode.com/problems/maximal-square ✅ instructive!
Flatten Nested List Iterator https://leetcode.com/problems/flatten-nested-list-iterator
Insert Interval https://leetcode.com/problems/insert-interval ✅ review it, aced but kinda shitty hehe
Triangle https://leetcode.com/problems/triangle
Sum of Two Integers https://leetcode.com/problems/sum-of-two-integers
K Closest Points to Origin https://leetcode.com/problems/k-closest-points-to-origin
Combinations https://leetcode.com/problems/combinations
Sort List https://leetcode.com/problems/sort-list
Minimum Size Subarray Sum https://leetcode.com/problems/minimum-size-subarray-sum ✅ review binary search follow up
Task Scheduler https://leetcode.com/problems/task-scheduler
Daily Temperatures https://leetcode.com/problems/daily-temperatures
Insert into a Binary Search Tree https://leetcode.com/problems/insert-into-a-binary-search-tree
Binary Tree Level Order Traversal II https://leetcode.com/problems/binary-tree-level-order-traversal-ii/
4Sum https://leetcode.com/problems/4sum ✅ review N-SUM solution
Unique Paths II https://leetcode.com/problems/unique-paths-ii
3Sum Closest https://leetcode.com/problems/3sum-closest
Divide Two Integers https://leetcode.com/problems/divide-two-integers ✅ Needs review, NOT bit manipulation try to come up with the recusive and thats fine
Find First and Last Position of Element in Sorted Array https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array
Unique Paths https://leetcode.com/problems/unique-paths
Subsets https://leetcode.com/problems/subsets
House Robber https://leetcode.com/problems/house-robber ✅ Review it and do similar questions, struggling solving this type of patterns ✅ Memo is really easy
Valid Number https://leetcode.com/problems/valid-number ✅ patience and drawing is the key
Word Ladder ‼️ https://leetcode.com/problems/word-ladder ✅ Future me, remember about bi-directional search
Longest Increasing Path in a Matrix https://leetcode.com/problems/longest-increasing-path-in-a-matrix
Max Points on a Line https://leetcode.com/problems/max-points-on-a-line
Longest Valid Parentheses https://leetcode.com/problems/longest-valid-parentheses
Text Justification https://leetcode.com/problems/text-justification
First Missing Positive https://leetcode.com/problems/first-missing-positive
Binary Tree Maximum Path Sum https://leetcode.com/problems/binary-tree-maximum-path-sum
N-Queens https://leetcode.com/problems/n-queens
Word Ladder II https://leetcode.com/problems/word-ladder-ii ✅ ❕
Longest Consecutive Sequence https://leetcode.com/problems/longest-consecutive-sequence ✅ ✅
Word Search II https://leetcode.com/problems/word-search-ii
Word Break II https://leetcode.com/problems/word-break-ii ✅ very easy bactrack exercise... may be review trie/dp approach but optional i guess
MinWindow https://leetcode.com/problems/minimum-window-substring ✅ ✅
Largest Rectangle in Histogram https://leetcode.com/problems/largest-rectangle-in-histogram ✅ ✅
The Skyline Problem https://leetcode.com/problems/the-skyline-problem ✅ do it again
Reverse Pairs https://leetcode.com/problems/reverse-pairs ✅ interesting
Sudoku Solver https://leetcode.com/problems/sudoku-solver ✅ May be review the Explore function... in general good
Sliding Window Maximum https://leetcode.com/problems/sliding-window-maximum ✅ Review it, very instructive!
Best Time to Buy and Sell Stock III https://leetcode.com/problems/best-time-to-buy-and-sell-stock-iii
Dungeon Game https://leetcode.com/problems/dungeon-game
Trapping Rain Water https://leetcode.com/problems/trapping-rain-water ✅ ✅, review DP, 2 pointers solution
Edit Distance https://leetcode.com/problems/edit-distance ‼️
Wildcard Matching https://leetcode.com/problems/wildcard-matching
Basic Calculator https://leetcode.com/problems/basic-calculator ✅ what a pain
Find Median from Data Stream https://leetcode.com/problems/find-median-from-data-stream ✅ review binary search
Merge k Sorted Lists https://leetcode.com/problems/merge-k-sorted-lists ✅ ✅
Maximal Rectangle https://leetcode.com/problems/maximal-rectangle ✅ ✅
Integer to English Words https://leetcode.com/problems/integer-to-english-words ✅ BS
(SD) Serialize and Deserialize Binary Tree https://leetcode.com/problems/serialize-and-deserialize-binary-tree
Median of Two Sorted Arrays https://leetcode.com/problems/median-of-two-sorted-arrays
Regular Expression Matching https://leetcode.com/problems/regular-expression-matching
Find the Closest Palindrome https://leetcode.com/problems/find-the-closest-palindrome ✅ NEEDS REVIEW
Reverse Nodes in k-Group https://leetcode.com/problems/reverse-nodes-in-k-group
Closest Binary Search Tree Value https://leetcode.com/problems/closest-binary-search-tree-value
One Edit Distance https://leetcode.com/problems/one-edit-distance ✅ review o(n) solution
Palindrome Permutation https://leetcode.com/problems/palindrome-permutation
Insert into a Cyclic Sorted List https://leetcode.com/problems/insert-into-a-sorted-circular-linked-list/ ✅ ❕
Convert Binary Search Tree to Sorted Doubly Linked List https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list
Walls and Gates https://leetcode.com/problems/walls-and-gates ✅ interesting approach
Largest BST Subtree https://leetcode.com/problems/largest-bst-subtree ✅ Instructive DFS!
Moving Average from Data Stream https://leetcode.com/problems/moving-average-from-data-stream
Wiggle Sort https://leetcode.com/problems/wiggle-sort
Binary Tree Vertical Order Traversal https://leetcode.com/problems/binary-tree-vertical-order-traversal
The Maze https://leetcode.com/problems/the-maze
Design Hit Counter https://leetcode.com/problems/design-hit-counter
Number of Distinct Islands https://leetcode.com/problems/number-of-distinct-islands
Find the Celebrity https://leetcode.com/problems/find-the-celebrity
Boundary of Binary Tree https://leetcode.com/problems/boundary-of-binary-tree
Reverse Words in a String II https://leetcode.com/problems/reverse-words-in-a-string-ii
Meeting Rooms II https://leetcode.com/problems/meeting-rooms-ii ✅ ❕
(SD) Design Tic-Tac-Toe https://leetcode.com/problems/design-tic-tac-toe
Basic Calculator III https://leetcode.com/problems/basic-calculator-iii
Serialize and Deserialize N-ary Tree https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree
Design Search Autocomplete System https://leetcode.com/problems/design-search-autocomplete-system
Alien Dictionary https://leetcode.com/problems/alien-dictionary

| My calendar II | https://leetcode.com/problems/alien-dictionary | ✅ !!!! segmented tree| | Path sum II | https://leetcode.com/problems/path-sum-ii | ✅ | | Path sum III | https://leetcode.com/problems/path-sum-iii | ✅ !!!! prefix sum| | Total anagrams | https://leetcode.com/problems/find-all-anagrams-in-a-string | ✅ | | Valid tree | https://leetcode.com/problems/graph-valid-tree/solution/ | ✅ | | Sort diagonally | https://leetcode.com/problems/sort-the-matrix-diagonally/ | ✅ | | Partition Labels | https://leetcode.com/problems/partition-labels | ✅ COOL GREEDY | | LCA III | https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-tree-iii | ✅ | | Unique paths III | https://leetcode.com/problems/unique-paths-iii | ✅ | | Minimum Number of Steps to Make Two Strings Anagram | https://leetcode.com/problems/minimum-number-of-steps-to-make-two-strings-anagram/ | ✅ REVIEW| | Rotating the Box | https://leetcode.com/problems/rotating-the-box/ | ✅ | | Maximum frequency stack| https://leetcode.com/problems/maximum-frequency-stack | ✅ cool lfu cache like | | Strobogrammatic | https://leetcode.com/problems/strobogrammatic-number/ | ✅ | | Maximum Number of Balloons | https://leetcode.com/problems/maximum-number-of-balloons | ✅ | | Number of connected components | https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/ | ✅ | | Find Duplicate File in System | https://leetcode.com/problems/find-duplicate-file-in-system/solution/ | ✅ | | Minimum Moves to Equal Array Elements II | https://leetcode.com/problems/minimum-moves-to-equal-array-elements-ii/ | ✅ | | Max Chunks To Make Sorted | https://leetcode.com/problems/max-chunks-to-make-sorted/ | ✅ | | Max Chunks To Make Sorted II | https://leetcode.com/problems/lexicographical-numbers/ | ✅ | | Max Consecutive Ones III | https://leetcode.com/problems/max-consecutive-ones-iii/ | ✅ review | | House Robber II | https://leetcode.com/problems/house-robber-ii/| ✅ | | String Without AAA or BBB | https://leetcode.com/problems/string-without-aaa-or-bbb/ | ✅ |

About

Solved common technical interview questions on C#

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages