├── .gitignore ├── 2 Keys Keyboard ├── README.md ├── solution.cpp └── solution.txt ├── 3 Sum ├── README.md ├── images │ ├── ap2-step1.png │ ├── ap2-step2.png │ └── ap2-step3.png └── solution.cpp ├── BST Checker ├── README.md ├── solution.cpp └── solution2.cpp ├── CS Fundamentals ├── DBMS.txt └── OOPs.txt ├── Count Numbers Less Than K ├── README.md ├── solution.cpp └── solution.txt ├── Deterministic Finite Automaton ├── README.md ├── solution.cpp └── solution.md ├── Diameter of Generic Tree ├── README.md └── solution.cpp ├── Find K Closest Elements ├── README.md └── solution.cpp ├── Game of Life ├── README.md └── solution.cpp ├── Gas Station ├── README.md ├── solution.cpp └── solution.txt ├── Get Set Queries ├── README.md ├── solution.cpp └── solution.txt ├── Island Count ├── README.md ├── example.png └── solution.cpp ├── LICENSE ├── Linked List ├── Cycle Detection │ ├── README.md │ └── solution.cpp ├── Delete Node │ ├── README.md │ ├── solution.cpp │ └── solution.txt ├── Remove Zero Sum Consecutive Nodes │ ├── README.md │ ├── solution.cpp │ └── solution.txt └── Shift Linked List │ ├── README.md │ ├── scratchpad.txt │ └── solution.cpp ├── Majority Element ├── README.md ├── solution.cpp └── solution.txt ├── Maximum Selling Gap ├── README.md ├── solution.cpp └── solution.md ├── Minimize The Absolute Difference ├── README.md ├── solution.cpp └── solution.txt ├── Minimum Falling Path Sum ├── README.md ├── solution.cpp └── solution.txt ├── Populating Next Right Pointers ├── README.md └── solution.cpp ├── README.md ├── Remove K Digits ├── README.md ├── solution.cpp └── solution.txt ├── Set Matrix Zeroes ├── README.md ├── solution.txt ├── solution_constant_space.cpp └── solution_linear_space.cpp ├── Target Sum └── solution.cpp ├── Unique Paths III ├── README.md └── solution.cpp ├── Very Hard Queries ├── README.md ├── image_1.png ├── solution.cpp └── solution.md ├── Ways To Form Max Heap ├── README.md ├── solution.cpp └── solution.txt └── Word Break ├── README.md ├── solution.cpp └── solution.txt /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/.gitignore -------------------------------------------------------------------------------- /2 Keys Keyboard/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/2 Keys Keyboard/README.md -------------------------------------------------------------------------------- /2 Keys Keyboard/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/2 Keys Keyboard/solution.cpp -------------------------------------------------------------------------------- /2 Keys Keyboard/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/2 Keys Keyboard/solution.txt -------------------------------------------------------------------------------- /3 Sum/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/3 Sum/README.md -------------------------------------------------------------------------------- /3 Sum/images/ap2-step1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/3 Sum/images/ap2-step1.png -------------------------------------------------------------------------------- /3 Sum/images/ap2-step2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/3 Sum/images/ap2-step2.png -------------------------------------------------------------------------------- /3 Sum/images/ap2-step3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/3 Sum/images/ap2-step3.png -------------------------------------------------------------------------------- /3 Sum/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/3 Sum/solution.cpp -------------------------------------------------------------------------------- /BST Checker/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/BST Checker/README.md -------------------------------------------------------------------------------- /BST Checker/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/BST Checker/solution.cpp -------------------------------------------------------------------------------- /BST Checker/solution2.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/BST Checker/solution2.cpp -------------------------------------------------------------------------------- /CS Fundamentals/DBMS.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/CS Fundamentals/DBMS.txt -------------------------------------------------------------------------------- /CS Fundamentals/OOPs.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/CS Fundamentals/OOPs.txt -------------------------------------------------------------------------------- /Count Numbers Less Than K/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Count Numbers Less Than K/README.md -------------------------------------------------------------------------------- /Count Numbers Less Than K/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Count Numbers Less Than K/solution.cpp -------------------------------------------------------------------------------- /Count Numbers Less Than K/solution.txt: -------------------------------------------------------------------------------- 1 | To be updated! -------------------------------------------------------------------------------- /Deterministic Finite Automaton/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Deterministic Finite Automaton/README.md -------------------------------------------------------------------------------- /Deterministic Finite Automaton/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Deterministic Finite Automaton/solution.cpp -------------------------------------------------------------------------------- /Deterministic Finite Automaton/solution.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Deterministic Finite Automaton/solution.md -------------------------------------------------------------------------------- /Diameter of Generic Tree/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Diameter of Generic Tree/README.md -------------------------------------------------------------------------------- /Diameter of Generic Tree/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Diameter of Generic Tree/solution.cpp -------------------------------------------------------------------------------- /Find K Closest Elements/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Find K Closest Elements/README.md -------------------------------------------------------------------------------- /Find K Closest Elements/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Find K Closest Elements/solution.cpp -------------------------------------------------------------------------------- /Game of Life/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Game of Life/README.md -------------------------------------------------------------------------------- /Game of Life/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Game of Life/solution.cpp -------------------------------------------------------------------------------- /Gas Station/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Gas Station/README.md -------------------------------------------------------------------------------- /Gas Station/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Gas Station/solution.cpp -------------------------------------------------------------------------------- /Gas Station/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Gas Station/solution.txt -------------------------------------------------------------------------------- /Get Set Queries/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Get Set Queries/README.md -------------------------------------------------------------------------------- /Get Set Queries/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Get Set Queries/solution.cpp -------------------------------------------------------------------------------- /Get Set Queries/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Get Set Queries/solution.txt -------------------------------------------------------------------------------- /Island Count/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Island Count/README.md -------------------------------------------------------------------------------- /Island Count/example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Island Count/example.png -------------------------------------------------------------------------------- /Island Count/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Island Count/solution.cpp -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/LICENSE -------------------------------------------------------------------------------- /Linked List/Cycle Detection/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Cycle Detection/README.md -------------------------------------------------------------------------------- /Linked List/Cycle Detection/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Cycle Detection/solution.cpp -------------------------------------------------------------------------------- /Linked List/Delete Node/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Delete Node/README.md -------------------------------------------------------------------------------- /Linked List/Delete Node/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Delete Node/solution.cpp -------------------------------------------------------------------------------- /Linked List/Delete Node/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Delete Node/solution.txt -------------------------------------------------------------------------------- /Linked List/Remove Zero Sum Consecutive Nodes/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Remove Zero Sum Consecutive Nodes/README.md -------------------------------------------------------------------------------- /Linked List/Remove Zero Sum Consecutive Nodes/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Remove Zero Sum Consecutive Nodes/solution.cpp -------------------------------------------------------------------------------- /Linked List/Remove Zero Sum Consecutive Nodes/solution.txt: -------------------------------------------------------------------------------- 1 | To be updated! -------------------------------------------------------------------------------- /Linked List/Shift Linked List/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Shift Linked List/README.md -------------------------------------------------------------------------------- /Linked List/Shift Linked List/scratchpad.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Shift Linked List/scratchpad.txt -------------------------------------------------------------------------------- /Linked List/Shift Linked List/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Linked List/Shift Linked List/solution.cpp -------------------------------------------------------------------------------- /Majority Element/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Majority Element/README.md -------------------------------------------------------------------------------- /Majority Element/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Majority Element/solution.cpp -------------------------------------------------------------------------------- /Majority Element/solution.txt: -------------------------------------------------------------------------------- 1 | Will be updated! -------------------------------------------------------------------------------- /Maximum Selling Gap/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Maximum Selling Gap/README.md -------------------------------------------------------------------------------- /Maximum Selling Gap/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Maximum Selling Gap/solution.cpp -------------------------------------------------------------------------------- /Maximum Selling Gap/solution.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Maximum Selling Gap/solution.md -------------------------------------------------------------------------------- /Minimize The Absolute Difference/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Minimize The Absolute Difference/README.md -------------------------------------------------------------------------------- /Minimize The Absolute Difference/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Minimize The Absolute Difference/solution.cpp -------------------------------------------------------------------------------- /Minimize The Absolute Difference/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Minimize The Absolute Difference/solution.txt -------------------------------------------------------------------------------- /Minimum Falling Path Sum/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Minimum Falling Path Sum/README.md -------------------------------------------------------------------------------- /Minimum Falling Path Sum/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Minimum Falling Path Sum/solution.cpp -------------------------------------------------------------------------------- /Minimum Falling Path Sum/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Minimum Falling Path Sum/solution.txt -------------------------------------------------------------------------------- /Populating Next Right Pointers/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Populating Next Right Pointers/README.md -------------------------------------------------------------------------------- /Populating Next Right Pointers/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Populating Next Right Pointers/solution.cpp -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/README.md -------------------------------------------------------------------------------- /Remove K Digits/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Remove K Digits/README.md -------------------------------------------------------------------------------- /Remove K Digits/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Remove K Digits/solution.cpp -------------------------------------------------------------------------------- /Remove K Digits/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Remove K Digits/solution.txt -------------------------------------------------------------------------------- /Set Matrix Zeroes/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Set Matrix Zeroes/README.md -------------------------------------------------------------------------------- /Set Matrix Zeroes/solution.txt: -------------------------------------------------------------------------------- 1 | This video by Errichto will be helpful: 2 | https://www.youtube.com/watch?v=6_KMkeh5kEc -------------------------------------------------------------------------------- /Set Matrix Zeroes/solution_constant_space.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Set Matrix Zeroes/solution_constant_space.cpp -------------------------------------------------------------------------------- /Set Matrix Zeroes/solution_linear_space.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Set Matrix Zeroes/solution_linear_space.cpp -------------------------------------------------------------------------------- /Target Sum/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Target Sum/solution.cpp -------------------------------------------------------------------------------- /Unique Paths III/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Unique Paths III/README.md -------------------------------------------------------------------------------- /Unique Paths III/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Unique Paths III/solution.cpp -------------------------------------------------------------------------------- /Very Hard Queries/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Very Hard Queries/README.md -------------------------------------------------------------------------------- /Very Hard Queries/image_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Very Hard Queries/image_1.png -------------------------------------------------------------------------------- /Very Hard Queries/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Very Hard Queries/solution.cpp -------------------------------------------------------------------------------- /Very Hard Queries/solution.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Very Hard Queries/solution.md -------------------------------------------------------------------------------- /Ways To Form Max Heap/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Ways To Form Max Heap/README.md -------------------------------------------------------------------------------- /Ways To Form Max Heap/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Ways To Form Max Heap/solution.cpp -------------------------------------------------------------------------------- /Ways To Form Max Heap/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Ways To Form Max Heap/solution.txt -------------------------------------------------------------------------------- /Word Break/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Word Break/README.md -------------------------------------------------------------------------------- /Word Break/solution.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Word Break/solution.cpp -------------------------------------------------------------------------------- /Word Break/solution.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sahilbansal17/Coding-Interview-Problems/HEAD/Word Break/solution.txt --------------------------------------------------------------------------------