Skip to content

Commit 54909d7

Browse files
authored
README.md
1 parent 160222b commit 54909d7

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# LeetCode
2+
3+
A collection of my solutions to LeetCode problems, written for learning, practice, and fun.
4+
Each solution is written with readability and efficiency in mind.
5+
6+
---
7+
8+
## Structure
9+
10+
Each file is named after the problem title or number, e.g. `0001-two-sum.js`.
11+
12+
---
13+
14+
## Topics
15+
16+
- Arrays & Strings
17+
- Hash Maps
18+
- Two Pointers
19+
- Sliding Window
20+
- Recursion & Backtracking
21+
- Trees & Graphs
22+
- Dynamic Programming
23+
- Greedy Algorithms
24+
25+
---
26+
27+
## Example
28+
29+
```js
30+
// 1. Two Sum
31+
var twoSum = function(nums, target) {
32+
const map = new Map();
33+
for (let i = 0; i < nums.length; i++) {
34+
const diff = target - nums[i];
35+
if (map.has(diff)) {
36+
return [map.get(diff), i];
37+
}
38+
map.set(nums[i], i);
39+
}
40+
};
41+
```

0 commit comments

Comments
 (0)