https://github.com/ankitsamaddar/blind75_cpp_solutions
Blind 75 cpp solutions of Neetcode YT. Other cpp basics practice programs solutions.
https://github.com/ankitsamaddar/blind75_cpp_solutions
blind75 cpp-solutions leetcode-cpp leetcode-solutions neetcode
Last synced: about 2 months ago
JSON representation
Blind 75 cpp solutions of Neetcode YT. Other cpp basics practice programs solutions.
- Host: GitHub
- URL: https://github.com/ankitsamaddar/blind75_cpp_solutions
- Owner: ankitsamaddar
- Created: 2023-03-04T19:07:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-03-31T10:53:10.000Z (about 1 year ago)
- Last Synced: 2025-02-09T04:15:37.052Z (4 months ago)
- Topics: blind75, cpp-solutions, leetcode-cpp, leetcode-solutions, neetcode
- Language: C++
- Homepage:
- Size: 199 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cpp_solutions
Cpp solutions to some coding problems.
## Table Of Contents
- [cpp\_solutions](#cpp_solutions)
- [cpp-basics](#cpp-basics)
- [cpp-blind-75](#cpp-blind-75)
- [Array](#array)
- [Binary](#binary)
- [Matrix](#matrix)
- [Linked List](#linked-list)
- [String](#string)
- [Heap](#heap)
- [Interval](#interval)
- [Tree](#tree)
- [Graph](#graph)
- [Dynamic Programming](#dynamic-programming)## [cpp-basics](./cpp-basics)
The [cpp-basics](./cpp-basics/README.md) contains basic programs learning C++ language.
## [cpp-blind-75](./cpp-blind-75/)
The [cpp-blind-75](./cpp-blind-75/README.md) contains a collection of solutions to 75 LeetCode questions from [NeetCode YT](https://docs.google.com/spreadsheets/d/1A2PaQKcdwO_lwxz9bAnxXnIQayCouZP6d-ENrBz_NXc/edit?usp=sharing) in C++ language.
Leetcode links for the programs at the beginning of each file.
### Array
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 01 | 1. Two Sum
🟢Easy | [1](https://leetcode.com/problems/two-sum) | [56](https://www.lintcode.com/problem/56) | 27-07-2023
[Cpp]() | |
| 02 | 121. Best Time to Buy and Sell Stock
🟢Easy | [121](https://leetcode.com/problems/best-time-to-buy-and-sell-stock) | [149](https://www.lintcode.com/problem/149) | 27-07-2023
[Cpp]() | |
| 03 | 217. Contains Duplicate
🟢Easy | [217](https://leetcode.com/problems/contains-duplicate) | [1320](https://www.lintcode.com/problem/1320) | 27-07-2023
[Cpp]() | |
| 04 | 238. Product of Array Except Self
🟡Medium | [238](https://leetcode.com/problems/product-of-array-except-self) | [1310](https://www.lintcode.com/problem/1310) | 27-07-2023
[Cpp]() | |
| 05 | 53. Maximum Subarray
🟡Medium | [53](https://leetcode.com/problems/maximum-subarray) | [41](https://www.lintcode.com/problem/41) | 28-07-2023
[Cpp]() | |
| 06 | 152. Maximum Product Subarray
🟡Medium | [152](https://leetcode.com/problems/maximum-product-subarray) | [191](https://www.lintcode.com/problem/191) | 28-July-2023
[Cpp]() | |
| 07 | 153. Find Minimum in Rotated Sorted Array
🟡Medium | [153](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array) | [159](https://www.lintcode.com/problem/159) | 28-July-2023
[Cpp]() | |
| 08 | 33. Search in Rotated Sorted Array
🟡Medium | [33](https://leetcode.com/problems/search-in-rotated-sorted-array) | [62](https://www.lintcode.com/problem/62) | 28-July-2023
[Cpp]() | |
| 09 | 15. 3Sum
🟡Medium | [15](https://leetcode.com/problems/3sum) | [57](https://www.lintcode.com/problem/57) | 28-July-2023
[Cpp]() | |
| 10 | 11. Container With Most Water
🟡Medium | [11](https://leetcode.com/problems/container-with-most-water) | [383](https://www.lintcode.com/problem/383) | 28-July-2023
[Cpp]() | |### Binary
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 11 | 371. Sum of Two Integers
🟡Medium | [371](https://leetcode.com/problems/sum-of-two-integers) | 🔒 [1276](https://www.lintcode.com/problem/1276) | 28-July-2023
[Cpp]() | |
| 12 | 191. Number of 1 Bits
🟢Easy | [191](https://leetcode.com/problems/number-of-1-bits) | [1332](https://www.lintcode.com/problem/1332) | 28-July-2023
[Cpp]() | |
| 13 | 338. Counting Bits
🟢Easy | [338](https://leetcode.com/problems/counting-bits) | 🔒 [664](https://www.lintcode.com/problem/664) | 28-July-2023
[Cpp]() | |
| 14 | 268. Missing Number
🟢Easy | [268](https://leetcode.com/problems/missing-number) | [196](https://www.lintcode.com/problem/196) | 28-July-2023
[Cpp]() | |
| 15 | 190. Reverse Bits
🟢Easy | [190](https://leetcode.com/problems/reverse-bits) | [1333](https://www.lintcode.com/problem/1333) | 28-July-2023
[Cpp]() | |### Matrix
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 16 | 73. Set Matrix Zeroes
🟡Medium | [73](https://leetcode.com/problems/set-matrix-zeroes) | [162](https://www.lintcode.com/problem/162) | 29-July-2023
[Cpp]() | |
| 17 | 54. Spiral Matrix
🟡Medium | [54](https://leetcode.com/problems/spiral-matrix) | [374](https://www.lintcode.com/problem/374) | 29-July-2023
[Cpp]() | |
| 18 | 48. Rotate Image
🟡Medium | [48](https://leetcode.com/problems/rotate-image) | [161](https://www.lintcode.com/problem/161) | 29-July-2023
[Cpp]() | |
| 19 | 79. Word Search
🟡Medium | [79](https://leetcode.com/problems/word-search) | [123](https://www.lintcode.com/problem/123) | 29-July-2023
[Cpp]() | |### Linked List
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 20 | 206. Reverse Linked List
🟢Easy | [206](https://leetcode.com/problems/reverse-linked-list) | [35](https://www.lintcode.com/problem/35) | 02-August-2023
[Cpp]() | |
| 21 | 141. Linked List Cycle
🟢Easy | [141](https://leetcode.com/problems/linked-list-cycle) | [102](https://www.lintcode.com/problem/102) | 02-August-2023
[Cpp]() | |
| 22 | 21. Merge Two Sorted Lists
🟢Easy | [21](https://leetcode.com/problems/merge-two-sorted-lists) | [165](https://www.lintcode.com/problem/165) | 02-August-2023
[Cpp]() | |
| 23 | 23. Merge k Sorted Lists
🔴Hard | [23](https://leetcode.com/problems/merge-k-sorted-lists) | [104](https://www.lintcode.com/problem/104) | 02-Aug-2023
[Cpp]() | |
| 24 | 19. Remove Nth Node From End of List
🟡Medium | [19](https://leetcode.com/problems/remove-nth-node-from-end-of-list) | [174](https://www.lintcode.com/problem/174) | 02-Aug-2023
[Cpp]() | |
| 25 | 143. Reorder List
🟡Medium | [143](https://leetcode.com/problems/reorder-list) | [99](https://www.lintcode.com/problem/99) | 02-Aug-2023
[Cpp]() | |### String
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 26 | 3. Longest Substring Without Repeating Characters
🟡Medium | [3](https://leetcode.com/problems/longest-substring-without-repeating-characters) | [384](https://www.lintcode.com/problem/384) | 03-Aug-2023
[Cpp]() | |
| 27 | 424. Longest Repeating Character Replacement
🟡Medium | [424](https://leetcode.com/problems/longest-repeating-character-replacement) | [1246](https://www.lintcode.com/problem/1246) | 03-Aug-2023
[Cpp]() | |
| 28 | 76. Minimum Window Substring
🔴Hard | [76](https://leetcode.com/problems/minimum-window-substring) | [32](https://www.lintcode.com/problem/32) | 03-Aug-2023
[Cpp]() | |
| 29 | 242. Valid Anagram
🟢Easy | [242](https://leetcode.com/problems/valid-anagram) | [158](https://www.lintcode.com/problem/158) | 05-Aug-2023
[Cpp]() | |
| 30 | 49. Group Anagrams
🟡Medium | [49](https://leetcode.com/problems/group-anagrams) | 🔒 [772](https://www.lintcode.com/problem/772) | 05-Aug-2023
[Cpp]() | |
| 31 | 20. Valid Parentheses
🟢Easy | [20](https://leetcode.com/problems/valid-parentheses) | [423](https://www.lintcode.com/problem/423) | 05-Aug-2023
[Cpp]() | |
| 32 | 125. Valid Palindrome
🟢Easy | [125](https://leetcode.com/problems/valid-palindrome) | [415](https://www.lintcode.com/problem/415) | 05-Aug-2023
[Cpp]() | |
| 33 | 5. Longest Palindromic Substring
🟡Medium | [5](https://leetcode.com/problems/longest-palindromic-substring) | [200](https://www.lintcode.com/problem/200) | 05-Aug-2023
[Cpp]() | |
| 34 | 647. Palindromic Substrings
🟡Medium | [647](https://leetcode.com/problems/palindromic-substrings) | [837](https://www.lintcode.com/problem/837) | 05-Aug-2023
[Cpp]() | |
| 35 | 271. Encode and Decode Strings
🟡Medium | 🔒 [271](https://leetcode.com/problems/encode-and-decode-strings) | [659](https://www.lintcode.com/problem/659) | 05-Aug-2023
[Cpp]() | |### Heap
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 36 | 347. Top K Frequent Elements
🟡Medium | [347](https://leetcode.com/problems/top-k-frequent-elements) | [1281](https://www.lintcode.com/problem/1281) | 06-Aug-2023
[Cpp]() | |
| 37 | 295. Find Median from Data Stream
🔴Hard | [295](https://leetcode.com/problems/find-median-from-data-stream) | [81](https://www.lintcode.com/problem/81) | 06-Aug-2023
[Cpp]() | |### Interval
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 38 | 57. Insert Interval
🟡Medium | [57](https://leetcode.com/problems/insert-interval) | [30](https://www.lintcode.com/problem/30) | 06-Aug-2023
[Cpp]() | |
| 39 | 56. Merge Intervals
🟡Medium | [56](https://leetcode.com/problems/merge-intervals) | [156](https://www.lintcode.com/problem/156) | 06-Aug-2023
[Cpp]() | |
| 40 | 435. Non-overlapping Intervals
🟡Medium | [435](https://leetcode.com/problems/non-overlapping-intervals) | [1242](https://www.lintcode.com/problem/1242) | 06-Aug-2023
[Cpp]() | |
| 41 | 252. Meeting Rooms
🟢Easy | 🔒 [252](https://leetcode.com/problems/meeting-rooms) | [920](https://www.lintcode.com/problem/920) | 06-Aug-2023
[Cpp]() | |
| 42 | 253. Meeting Rooms II
🟡Medium | 🔒 [253](https://leetcode.com/problems/meeting-rooms-ii) | [919](https://www.lintcode.com/problem/919) | 06-Aug-2023
[Cpp]() | |### Tree
| Sl No. | Problem Name w/ Difficulty | Leetcode | Lintcode | Solutions | Notes |
| :----: | --------- | :-----: | :-----: | :----: | --- |
| 43 | 104. Maximum Depth of Binary Tree
🟢Easy | [104](https://leetcode.com/problems/maximum-depth-of-binary-tree) | [97](https://www.lintcode.com/problem/97) | 06-Aug-2023
[Cpp]() | |
| 44 | 100. Same Tree
🟢Easy | [100](https://leetcode.com/problems/same-tree) | [469](https://www.lintcode.com/problem/469) | 07-Aug-2023
[Cpp]() | |
| 45 | 226. Invert Binary Tree
🟢Easy | [226](https://leetcode.com/problems/invert-binary-tree) | [175](https://www.lintcode.com/problem/175) | 07-Aug-2023
[Cpp]() | |
| 46 | 124. Binary Tree Maximum Path Sum
🔴Hard | [124](https://leetcode.com/problems/binary-tree-maximum-path-sum) | [94](https://www.lintcode.com/problem/94) | 07-Aug-2023
[Cpp]() | |
| 47 | 102. Binary Tree Level Order Traversal
🟡Medium | [102](https://leetcode.com/problems/binary-tree-level-order-traversal) | [69](https://www.lintcode.com/problem/69) | 07-Aug-2023
[Cpp]() | |
| 48 | 297. Serialize and Deserialize Binary Tree
🔴Hard | [297](https://leetcode.com/problems/serialize-and-deserialize-binary-tree) | [7](https://www.lintcode.com/problem/7) | 07-Aug-2023
[Cpp]() | |
| 49 | 572. Subtree of Another Tree
🟢Easy | [572](https://leetcode.com/problems/subtree-of-another-tree) | [1165](https://www.lintcode.com/problem/1165) | 07-Aug-2023
[Cpp]() | |
| 50 | 105. Construct Binary Tree from Preorder and Inorder Traversal
🟡Medium | [105](https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal) | [73](https://www.lintcode.com/problem/73) | 07-Aug-2023
[Cpp]() | |
| 51 | 98. Validate Binary Search Tree
🟡Medium | [98](https://leetcode.com/problems/validate-binary-search-tree) | [95](https://www.lintcode.com/problem/95) | 07-Aug-2023
[Cpp]() | |
| 52 | 230. Kth Smallest Element in a BST
🟡Medium | [230](https://leetcode.com/problems/kth-smallest-element-in-a-bst) | [902](https://www.lintcode.com/problem/902) | 07-Aug-2023
[Cpp]() | |
| 53 | 235. Lowest Common Ancestor of a Binary Search Tree
🟡Medium | [235](https://leetcode.com/problems/lowest-common-ancestor-of-a-binary-search-tree) | [1311](https://www.lintcode.com/problem/1311) | 07-Aug-2023
[Cpp]() | |
| 54 | 208. Implement Trie (Prefix Tree)
🟡Medium | [208](https://leetcode.com/problems/implement-trie-prefix-tree) | — | 07-Aug-2023
[Cpp]() | |
| 55 | 211. Design Add and Search Words Data Structure
🟡Medium | [211](https://leetcode.com/problems/design-add-and-search-words-data-structure) | — | 08-Aug-2023
[Cpp]() | |
| 56 | 212. Word Search II
🔴Hard | [212](https://leetcode.com/problems/word-search-ii) | [132](https://www.lintcode.com/problem/132) | 08-Aug-2023
[Cpp]() | |### Graph
| SL No | Problem Name w/ Difficulty | Leetcode | Lintcode | Solution | Notes |
| :---: | -------------------------- | :--------: | :--------: | :--------: | ----- |
| 57 | 133. Clone Graph
🟡Medium | [133](https://leetcode.com/problems/clone-graph) | [137](https://www.lintcode.com/problem/137) | 09-Aug-2023
[Cpp](<./cpp-blind-75/57_clone-graph.cpp>) | |
| 58 | 207. Course Schedule
🟡Medium | [207](https://leetcode.com/problems/course-schedule) | [615](https://www.lintcode.com/problem/615) | 09-Aug-2023
[Cpp](<./cpp-blind-75/58_course-schedule.cpp>) | |
| 59 | 417. Pacific Atlantic Water Flow
🟡Medium | [417](https://leetcode.com/problems/pacific-atlantic-water-flow) | [778](https://www.lintcode.com/problem/778) | 12-Aug-2023
[Cpp](<./cpp-blind-75/59_pacific-atlantic-water-flow.cpp>) | |
| 60 | 200. Number of Islands
🟡Medium | [200](https://leetcode.com/problems/number-of-islands) | [433](https://www.lintcode.com/problem/433) | 12-Aug-2023
[Cpp](<./cpp-blind-75/60_number-of-islands.cpp>) | |
| 61 | 128. Longest Consecutive Sequence
🟡Medium | [128](https://leetcode.com/problems/longest-consecutive-sequence) | [124](https://www.lintcode.com/problem/124) | 12-Aug-2023
[Cpp](<./cpp-blind-75/61_longest-consecutive-sequence.cpp>) | |
| 62 | 269. Alien Dictionary
🔴Hard | 🔒 [269](https://leetcode.com/problems/alien-dictionary) | [892](https://www.lintcode.com/problem/892) | 13-Aug-2023
[Cpp](<./cpp-blind-75/62_alien-dictionary.cpp>) | |
| 63 | 261. Graph Valid Tree
🟡Medium | 🔒 [261](https://leetcode.com/problems/graph-valid-tree) | [178](https://www.lintcode.com/problem/178) | 13-Aug-2023
[Cpp](<./cpp-blind-75/63_graph-valid-tree.cpp>) | |
| 64 | 323. Number of Connected Components in an Undirected Graph
🟡Medium | 🔒 [323](https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph) | [3651](https://www.lintcode.com/problem/3651) | 13-Aug-2023
[Cpp](<./cpp-blind-75/64_number-of-connected-components-in-an-undirected-graph.cpp>) | |### Dynamic Programming
| SL No | Problem Name w/ Difficulty | Leetcode | Lintcode | Solution | Notes |
| :---: | --------------------------- | :------: | :--------: | :--------: | ------ |
| 65 | 70. Climbing Stairs
🟢Easy | [70](https://leetcode.com/problems/climbing-stairs) | [111](https://www.lintcode.com/problem/111) | 13-Aug-2023
[Cpp](<./cpp-blind-75/65_climbing-stairs.cpp>) | |
| 66 | 322. Coin Change
🟡Medium | [322](https://leetcode.com/problems/coin-change) | [669](https://www.lintcode.com/problem/669) | 14-Aug-2023
[Cpp](<./cpp-blind-75/66_coin-change.cpp>) | |
| 67 | 300. Longest Increasing Subsequence
🟡Medium | [300](https://leetcode.com/problems/longest-increasing-subsequence) | [76](https://www.lintcode.com/problem/76) | 14-Aug-2023
[Cpp](<./cpp-blind-75/67_longest-increasing-subsequence.cpp>) | |
| 68 | 1143. Longest Common Subsequence
🟡Medium | [1143](https://leetcode.com/problems/longest-common-subsequence) | [77](https://www.lintcode.com/problem/77) | 14-Aug-2023
[Cpp](<./cpp-blind-75/68_longest-common-subsequence.cpp>) | |
| 69 | 139. Word Break
🟡Medium | [139](https://leetcode.com/problems/word-break) | [107](https://www.lintcode.com/problem/107) | 14-Aug-2023
[Cpp](<./cpp-blind-75/69_word-break.cpp>) | |
| 70 | 39. Combination Sum
🟡Medium | [39](https://leetcode.com/problems/combination-sum) | [135](https://www.lintcode.com/problem/135) | 14-Aug-2023
[Cpp](<./cpp-blind-75/70_combination-sum.cpp>) | |
| 71 | 198. House Robber
🟡Medium | [198](https://leetcode.com/problems/house-robber) | [392](https://www.lintcode.com/problem/392) | 14-Aug-2023
[Cpp](<./cpp-blind-75/71_house-robber.cpp>) | |
| 72 | 213. House Robber II
🟡Medium | [213](https://leetcode.com/problems/house-robber-ii) | [534](https://www.lintcode.com/problem/534) | 14-Aug-2023
[Cpp](<./cpp-blind-75/72_house-robber-ii.cpp>) | |
| 73 | 91. Decode Ways
🟡Medium | [91](https://leetcode.com/problems/decode-ways) | [512](https://www.lintcode.com/problem/512) | 15-Aug-2023
[Cpp](<./cpp-blind-75/73_decode-ways.cpp>) | |
| 74 | 62. Unique Paths
🟡Medium | [62](https://leetcode.com/problems/unique-paths) | [114](https://www.lintcode.com/problem/114) | 15-Aug-2023
[Cpp](<./cpp-blind-75/74_unique-paths.cpp>) | |
| 75 | 55. Jump Game
🟡Medium | [55](https://leetcode.com/problems/jump-game) | [116](https://www.lintcode.com/problem/116) | 15-Aug-2023
[Cpp](<./cpp-blind-75/75_jump-game.cpp>) | |