Skip to content

Commit 5ef8629

Browse files
2 parents 085c554 + 2f5b1fc commit 5ef8629

File tree

7 files changed

+80
-48
lines changed

7 files changed

+80
-48
lines changed

SYLLABUS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
- Lambda Expression
129129
- Enums
130130
- Fast IO
131+
- Greedy Algorithms
131132
- Stacks & Queues
132133
- Introduction
133134
- Interview problems

assignments/4-functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ Also,
3535

3636
10. Write a function to find if a number if palindrome or not. Take number as parameter.
3737

38-
11. Convert the programs in [flow of program](flow-of-program.md), [conditionals & loops](conditionals-loops.md), [first java](first-java.md) assignemts into functions.
38+
11. Convert the programs in [flow of program](flow-of-program.md), [conditionals & loops](conditionals-loops.md), [first java](first-java.md) assignments into functions.
3939

4040
12. Write a function to check if a given triplet is a Pythagorean triplet or not. (A Pythagorean triplet is when the sum of the square of two number is equal to the square of the third number).
4141

assignments/5-arrays.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
20. [Determine Whether Matrix Can Be Obtained By Rotation](https://leetcode.com/problems/determine-whether-matrix-can-be-obtained-by-rotation/)
2626
21. [Two Sum](https://leetcode.com/problems/two-sum/)
2727
22. [Find N Unique Integers Sum up to Zero](https://leetcode.com/problems/find-n-unique-integers-sum-up-to-zero/)
28-
28+
23. [Saddle Point In Matrix](https://leetcode.com/problems/lucky-numbers-in-a-matrix/)
2929

3030
### Medium
3131
1. [Spiral Matrix](https://leetcode.com/problems/spiral-matrix/)

assignments/6-searching.md

Lines changed: 46 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,50 @@
1-
Videos:
1+
# Videos:
22
- [Linear Search](https://youtu.be/_HRA37X8N_Q)
33
- [Binary Search](https://youtu.be/f6UU7V3szVw)
44

5-
Problems:
6-
- [Guess Number Higher or Lower(Easy)](https://leetcode.com/problems/guess-number-higher-or-lower/)
7-
- [First Bad Version(Easy)](https://leetcode.com/problems/first-bad-version/)
8-
- [Two Sum II - Input array is sorted(Easy)](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
9-
- [Valid Perfect Square(Easy)](https://leetcode.com/problems/valid-perfect-square/)
5+
# Problems:
6+
7+
## Easy
8+
- [Square Root](https://leetcode.com/problems/sqrtx/)
9+
- [Guess Number Higher or Lower](https://leetcode.com/problems/guess-number-higher-or-lower/)
10+
- [First Bad Version](https://leetcode.com/problems/first-bad-version/)
11+
- [Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
12+
- [Valid Perfect Square](https://leetcode.com/problems/valid-perfect-square/)
1013
- [Arranging Coins(Easy)](https://leetcode.com/problems/arranging-coins/)
11-
- [Find Smallest Letter Greater Than Target(Easy)](https://leetcode.com/problems/find-smallest-letter-greater-than-target/)
12-
- [Kth Missing Positive Number(Easy)](https://leetcode.com/problems/kth-missing-positive-number/)
13-
- [Search Insert Position(Easy)](https://leetcode.com/problems/search-insert-position/)
14-
- [Count Negative Numbers in a Sorted Matrix(Easy)](https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/)
15-
- [Find First and Last Position of Element in Sorted Array(Medium)](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
16-
- [Single Element in a Sorted Array(Medium)](https://leetcode.com/problems/single-element-in-a-sorted-array/)
17-
- [Search in Rotated Sorted Array(Medium)](https://leetcode.com/problems/search-in-rotated-sorted-array/)
18-
- [Search in Rotated Sorted Array II(Medium)](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/)
19-
- [Find Peak Element(Medium)](https://leetcode.com/problems/find-peak-element/)
20-
- [Search a 2D Matrix(Medium)](https://leetcode.com/problems/search-a-2d-matrix/)
21-
- [Reach a Number(Medium)](https://leetcode.com/problems/reach-a-number/)
22-
- [Koko Eating Bananas(Medium)](https://leetcode.com/problems/koko-eating-bananas/)
14+
- [Find Smallest Letter Greater Than Target](https://leetcode.com/problems/find-smallest-letter-greater-than-target/)
15+
- [Kth Missing Positive Number](https://leetcode.com/problems/kth-missing-positive-number/)
16+
- [Search Insert Position](https://leetcode.com/problems/search-insert-position/)
17+
- [Peak Index in a Mountain Array](https://leetcode.com/problems/peak-index-in-a-mountain-array/)
18+
- [Kth Missing Positive Number](https://leetcode.com/problems/kth-missing-positive-number/)
19+
- [Count Negative Numbers in a Sorted Matrix](https://leetcode.com/problems/count-negative-numbers-in-a-sorted-matrix/)
20+
- [Search Insert Position](https://leetcode.com/problems/search-insert-position/)
21+
- [Two Sum II - Input array is sorted](https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/)
22+
- [Intersection of Two Arrays](https://leetcode.com/problems/intersection-of-two-arrays/)
23+
- [Intersection of Two Arrays II](https://leetcode.com/problems/intersection-of-two-arrays-ii/)
24+
- [Fair Candy Swap](https://leetcode.com/problems/fair-candy-swap/)
25+
- [Check If N and Its Double Exist](https://leetcode.com/problems/check-if-n-and-its-double-exist/)
26+
- [Special Array With X Elements Greater Than or Equal X](https://leetcode.com/problems/special-array-with-x-elements-greater-than-or-equal-x/)
27+
28+
## Medium
29+
- [Find First and Last Position of Element in Sorted Array](https://leetcode.com/problems/find-first-and-last-position-of-element-in-sorted-array/)
30+
- [Single Element in a Sorted Array](https://leetcode.com/problems/single-element-in-a-sorted-array/)
31+
- [Search in Rotated Sorted Array](https://leetcode.com/problems/search-in-rotated-sorted-array/)
32+
- [Search in Rotated Sorted Array II](https://leetcode.com/problems/search-in-rotated-sorted-array-ii/)
33+
- [Find Minimum in Rotated Sorted Array](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array/)
34+
- [Find Peak Element](https://leetcode.com/problems/find-peak-element/)
35+
- [Find Right Interval](https://leetcode.com/problems/find-right-interval/)
36+
- [Reach a Number](https://leetcode.com/problems/reach-a-number/)
37+
- [Maximum Value at a Given Index in a Bounded Array](https://leetcode.com/problems/maximum-value-at-a-given-index-in-a-bounded-array/)
38+
- [Koko Eating Bananas](https://leetcode.com/problems/koko-eating-bananas/)
39+
- [Minimum Absolute Sum Difference](https://leetcode.com/problems/minimum-absolute-sum-difference/)
40+
- [Search a 2D Matrix](https://leetcode.com/problems/search-a-2d-matrix/)
41+
- [Find a Peak Element II](https://leetcode.com/problems/find-a-peak-element-ii/)
42+
- [Frequency of the Most Frequent Element](https://leetcode.com/problems/frequency-of-the-most-frequent-element/)
43+
- [Find the Duplicate Number](https://leetcode.com/problems/find-the-duplicate-number/)
44+
45+
## Hard
46+
- [Median of Two Sorted Arrays](https://leetcode.com/problems/median-of-two-sorted-arrays/)
47+
- [Find Minimum in Rotated Sorted Array II](https://leetcode.com/problems/find-minimum-in-rotated-sorted-array-ii/)
48+
- [Aggressive cows](https://www.spoj.com/problems/AGGRCOW/)
49+
- [Split Array Largest Sum](https://leetcode.com/problems/split-array-largest-sum/)
50+
- [Find in Mountain Array](https://leetcode.com/problems/find-in-mountain-array/)

assignments/patterns.txt renamed to assignments/patterns.md

Lines changed: 31 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ Pattern Questions
22

33
Print these patterns using loops:
44

5+
```text
56
67
1. *****
78
*****
@@ -24,14 +25,14 @@ Print these patterns using loops:
2425
*
2526
2627
27-
3. 1
28+
4. 1
2829
1 2
2930
1 2 3
30-
1 2 3 4
31+
1 2 3 4
3132
1 2 3 4 5
3233
3334
34-
4. *
35+
5. *
3536
**
3637
***
3738
****
@@ -43,75 +44,75 @@ Print these patterns using loops:
4344
*
4445
4546
46-
5. *
47+
6. *
4748
**
4849
***
4950
****
5051
*****
5152
5253
53-
6. *****
54+
7. *****
5455
****
5556
***
5657
**
5758
*
5859
5960
60-
7. *
61+
8. *
6162
***
6263
*****
6364
*******
6465
*********
6566
6667
67-
8. *********
68+
9. *********
6869
*******
6970
*****
7071
***
7172
*
7273
7374
74-
9. *
75+
10. *
7576
* *
7677
* * *
7778
* * * *
7879
* * * * *
7980
8081
81-
10. * * * * *
82+
11. * * * * *
8283
* * * *
8384
* * *
8485
* *
8586
*
8687
8788
88-
11. * * * * *
89+
12. * * * * *
8990
* * * *
9091
* * *
9192
* *
9293
*
93-
*
94+
*
9495
* *
9596
* * *
9697
* * * *
97-
* * * * *
98+
* * * * *
9899
99100
100-
12. *
101+
13. *
101102
* *
102103
* *
103104
* *
104105
*********
105106
106107
107-
13. *********
108+
14. *********
108109
* *
109110
* *
110111
* *
111112
*
112113
113114
114-
14. *
115+
15. *
115116
* *
116117
* *
117118
* *
@@ -122,14 +123,14 @@ Print these patterns using loops:
122123
*
123124
124125
125-
15. 1
126+
16. 1
126127
1 1
127128
1 2 1
128129
1 3 3 1
129130
1 4 6 4 1
130131
131132
132-
16. 1
133+
17. 1
133134
212
134135
32123
135136
4321234
@@ -138,19 +139,19 @@ Print these patterns using loops:
138139
1
139140
140141
141-
17. **********
142+
18. **********
142143
**** ****
143144
*** ***
144145
** **
145146
* *
146147
* *
147148
** **
148149
*** ***
149-
**** ****
150+
**** ****
150151
**********
151152
152153
153-
18. * *
154+
19. * *
154155
** **
155156
*** ***
156157
**** ****
@@ -161,29 +162,29 @@ Print these patterns using loops:
161162
* *
162163
163164
164-
19. ****
165+
20. ****
165166
* *
166167
* *
167168
* *
168169
****
169170
170-
20. 1
171+
21. 1
171172
2 3
172173
4 5 6
173174
7 8 9 10
174175
11 12 13 14 15
175176
176-
21. 1
177+
22. 1
177178
0 1
178179
1 0 1
179180
0 1 0 1
180181
1 0 1 0 1
181182
182-
22. * *
183+
23. * *
183184
* * * *
184185
* * *
185186
186-
23. * *
187+
24. * *
187188
** **
188189
* * * *
189190
* * * *
@@ -194,20 +195,22 @@ Print these patterns using loops:
194195
** **
195196
* *
196197
197-
24. *****
198+
25. *****
198199
* *
199200
* *
200201
* *
201202
*****
202203
203-
25. 1 1 1 1 1 1
204+
26. 1 1 1 1 1 1
204205
2 2 2 2 2
205206
3 3 3 3
206207
4 4 4
207208
5 5
208209
6
209210
210-
26. 1 2 3 4 17 18 19 20
211+
27. 1 2 3 4 17 18 19 20
211212
5 6 7 14 15 16
212213
8 9 12 13
213214
10 11
215+
216+
```

lectures/8-arrays/1D_arrays.png

639 KB
Loading

lectures/8-arrays/2D_arrays.png

351 KB
Loading

0 commit comments

Comments
 (0)