Skip to content

Calvinjmin/Interview_Questions

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Interview Questions

The purpose of this repo is to keep track of key algorithms/solutions for common Leetcode questions. Furthermore, there will be solutions in multiple languages to show the versatility of my coding abilities.

Languages

C++ Files

Array

File Name Description
best-time-to-buy-and-sell-stock-121.cpp Sliding Window - Leetcode 121
gas-station-.cpp Math Logic with Array Trackers - Leetcode 134
kids-with-the-greatest-number-of-candies-1431.cpp Array Manipulation with Max Value - Leetcode 1431
meeting-rooms-252.cpp Basic 2D Vector Sorting - Leetcode 252
minimum-time-difference-539.cpp Sorting and Converting String - Leetcode 539

Two_Pointer

File Name Description
containter-with-most-water-11.cpp Out to In Two Pointer - Leetcode 11
is-subsequence-392.cpp Two Pointer with Basic Tracker - Leetcode 392
three-sum-15.cpp Two Pointer with Set Tracker - Leetcode 15
trapping-rain-water-42.cpp Two Pointer with Max Wall - Leetcode 42

Sliding_Window

File Name Description
find-all-anagrams-in-a-string-438.cpp Prefix Window - Leetcode 438
longest-substring-without-repeating-characters-3.cpp Set with Sliding Window - Leetcode 3
maximum-number-of-vowels-in-a-substring-of-given-length-1456.cpp O(1) Vector Lookup with Sliding Window - Leetcode 1456
minimum-size-subarray-sum-208.cpp Sliding Window w/ Running Counter - Leetcode 208

Backtracking

File Name Description
letter-combinations-of-a-phone-number-17.cpp Iteration with Backtracking - Leetcode 17
pemutations-II-47.cpp Permutations w/ all possible combinations - Leetcode 47
word-search-79.cpp DFS Backtracking on a Grid - Leetcode 79

Greedy

File Name Description
ipo-502.cpp Maximize Profits with Priority Queue - Leetcode 502
jump-game-55.cpp Greedy Choice - Leetcode 55
jump-game-II-45.cpp Greedy Choice w/ Tracker - Leetcode 45
largest-number-179.cpp Greedy Choice with sorting based on string concatenation - Leetcode 179
optimal-partition-of-string-2405.cpp Take longest substring until there is a duplicate - Leetcode 2405

Dynamic_Programming

File Name Description
coin-change-322.cpp Bottom Up DP - Leetcode 322
decode-ways-91.cpp Iterative Dynamic Programming - Leetcode 91
different-ways-to-add-parentheses-241.cpp Breaking expressions into two with DP - Leetcode 241
extra-characters-in-a-string-2707.cpp Bottom Up Method w/ Substring - Leetcode 2707
house-robber-198.cpp Basic DP Question - Leetcode 198
house-robber-II-213.cpp Twist with Tracking in Circular Array - Leetcode 213
longest-palindromic-substring-5.cpp Two Pointer with Dynamic Programming - Leetcode 5
minimum-path-sum-64.cpp 2D Matrix Dynamic Programming - Leetcode 64
palindromic-substrings-647.cpp 2D DP with Two Pointer Logic - Leetcode 647

Graph

File Name Description
number-of-closed-islands-1254.cpp BFS on 2D Matrix with a Twist - Leetcode 1254
number-of-islands-200.cpp BFS on 2D Matrix - Leetcode 200

Math

File Name Description
armstrong-number-1134.cpp Mod and Power - Leetcode 1134
reverse-integer-7.cpp Basic Math Manipulation - Leetcode 7
the-kth-factor-of-n-1492.cpp Principles of being a factor - Leetcode 1492

Hash_Table

File Name Description
determine-if-two-strings-are-close-1657.cpp Set with Freq Map Equality - Leetcode 1657
group-anagrams-49.cpp Key Generation using Freq Map - Leetcode 49
largest-unique-number-1133.cpp Reverse Iterator with Map - Leetcode 1133
longest-consecutive-sequence-128.cpp Elevated TwoSum - Leetcode 128
minimum-number-of-keypresses-2268.cpp Frequency Map w/ Basic Sorting - Leetcode 2268
two-sum-1.cpp Hash Table to hold complement - Leetcode 1
uncommon-words-from-two-sentences-884.cpp Using String Stream to Split w/ Hash Table - Leetcode 884

Heap

File Name Description
kth-largest-element-in-array-215.cpp Min Heap O(n) Loop - Leetcode 215
meeting-rooms-ii-253.cpp Using Heap with Basic Logic - Leetcode 253

Trees

File Name Description
binary-tree-level-order-traversal-102.cpp BFS on Binary Tree - Leetcode 102
binary-tree-right-side-view-199.cpp Level Order Traversal with a Twist - Leetcode 199
sum-root-to-leaf-numbers-129.cpp Basic Path DFS - Leetcode 129
treeNode.h Helper TreeNode Struct

Prefix_Tree

File Name Description
lexicographical-numbers-386.cpp Basics of a Prefix Tree - Leetcode 386

Sets

File Name Description
my-calendar-1-729.cpp Lower Bound Set Method - Leetcode 729
rank-transform-of-an-array-1331.cpp Auto Sort with Set - Leetcode 1331

Stacks

File Name Description
maximum-width-ramp-962.cpp Using Sorted Stack and Traverse - Leetcode 962
minimum-remove-to-make-valid-parentheses-1249.cpp Valid Parentheses Sister Question - Leetcode 1249

Binary_Search

File Name Description
find-first-and-last-position-of-element-in-sorted-array-34.cpp Modified Binary Search to look left and right - Leetcode 34
koko-eating-bananas-875.cpp Binary Search to Find Rate - Leetcode 875
search-insert-position-35.cpp Basics of Binary Search - Leetcode 35

Matrix

File Name Description
game-of-life-289.cpp In Place Solution with Matrix Manipulation - Leetcode 289

Linked_Lists

File Name Description
add-two-numbers-2.cpp Tracking Two Linked Lists - Leetcode 2
listNode.h Helper ListNode Struct

Python Files

Backtracking

File Name Description
generate-parentheses-22.py Basic Backtracking - Leetcode 22

Greedy

File Name Description
jump-game-55.py Max Jump as Greedy Choice - Leetcode 55

Dynamic_Programming

File Name Description
house-robber-198.py Bottom Up DP - Leetcode 198

Resources

Link to HackerRank - Hackerank
Link to Leetcode - Leetcode
Calvin Min | 2024

About

Personal Solutions to common Leet Code Questions

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published