Skip to content

Commit d6867b7

Browse files
authored
Merge branch 'kunal-kushwaha:main' into assignmentLeetcode
2 parents 5e500d5 + e18b3e9 commit d6867b7

24 files changed

+44
-14
lines changed

ASSIGNMENT_SOLUTIONS.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,21 @@
22

33
## Public repositories that contain solutions for [assignments](https://github.com/kunal-kushwaha/DSA-Bootcamp-Java/tree/main/assignments)
44

5+
### Java
6+
57
- Milind Mishra's [solutions](https://github.com/thatbeautifuldream/java-dsa-bootcamp)
68
- Divya Sri Darimisetti's [solutions](https://github.com/irsayvid/problem-attic)
79
- Hrishabh Jain's [solutions](https://github.com/Hrishabh5/Java-DSA-Kunal-Kushwaha)
810
- Mayank Singh's [solutions](https://github.com/mayankkuthar/DSA-with-JAVA)
911
- Rishabh Kumar's [solutions](https://github.com/crishabhkumar/Leetcode)
10-
- Adarsh Navneet Sinha's [solutions](https://github.com/geeky01adarsh/DSA-Interview-Questions) (in C++)
11-
- Aditya Chauhan's [solution](https://github.com/aditya-2703/DSA)(Python)
12-
- Deepak Mittal's [solutions](https://github.com/yesdeepakmittal/competitive-coding/tree/main/Kunal-DSA-Py-Solution)(Python)
13-
- Alok Verma's [solutions](https://github.com/alokVerma749/DSA-Bootcamp-assignment-solutions.git)(Java)
14-
- Samadrita Shaw's [solutions](https://github.com/Samadrita-Shaw/Leetcode-Solutions-DSAwithKunal)(Java)
12+
- Samadrita Shaw's [solutions](https://github.com/Samadrita-Shaw/Leetcode-Solutions-DSAwithKunal)
13+
- Alok Verma's [solutions](https://github.com/alokVerma749/DSA-Bootcamp-assignment-solutions.git)
14+
15+
### Python
16+
17+
- Aditya Chauhan's [solution](https://github.com/aditya-2703/DSA)
18+
- Deepak Mittal's [solutions](https://github.com/yesdeepakmittal/competitive-coding/tree/main/Kunal-DSA-Py-Solution)
19+
20+
### C++
21+
22+
- Adarsh Navneet Sinha's [solutions](https://github.com/geeky01adarsh/DSA-Interview-Questions)

CONTRIBUTION.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Contribution Guide
2+
13
1. Fork the Repository by clicking on the symbol at the top right corner.
24

35
2. Clone the forked Repository in your local System.

SYLLABUS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,6 @@
162162
- Chaining
163163
- Probing
164164
- Huffman-Encoder
165-
- Top K elements problems
166165
- Subarray Questions: Sliding window, Two Pointer, Kadane's Algorithm
167166
- Graphs
168167
- Introduction

assignments/05-arrays.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
25. [Reshape the Matrix](https://leetcode.com/problems/reshape-the-matrix/)
3333
26. [Plus One](https://leetcode.com/problems/plus-one/)
3434
27. [Remove Duplicates from Sorted Array](https://leetcode.com/problems/remove-duplicates-from-sorted-array/)
35+
28. [Minimum Cost to Move Chips to The Same Position](https://leetcode.com/problems/minimum-cost-to-move-chips-to-the-same-position/)
3536

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

assignments/08-strings.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
- [Reverse Prefix of Word](https://leetcode.com/problems/reverse-prefix-of-word/)
3131
- [Roman to Integer](https://leetcode.com/problems/roman-to-integer/)
3232
- [Valid Parentheses](https://leetcode.com/problems/valid-parentheses/)
33+
- [Length of last word](https://leetcode.com/problems/length-of-last-word/)
3334

3435
## Medium
3536

assignments/12-math.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,31 @@
1010
- [Power of Four](https://leetcode.com/problems/power-of-four/)
1111
- [Factorial](https://practice.geeksforgeeks.org/problems/factorial5739/1/?category[]=Mathematical&category[]=Mathematical&page=3&query=category[]Mathematicalpage3category[]Mathematical)
1212
- [Excel Sheet Column Title](https://leetcode.com/problems/excel-sheet-column-title/)
13+
- [Maximum Product of Three Numbers](https://leetcode.com/problems/maximum-product-of-three-numbers/)
14+
- [Climbing Stairs](https://leetcode.com/problems/climbing-stairs/)
15+
- [Self Dividing Numbers](https://leetcode.com/problems/self-dividing-numbers/)
16+
- [Add Binary](https://leetcode.com/problems/add-binary/)
17+
- [Power of Two](https://leetcode.com/problems/power-of-two/)
1318

1419
## Medium
1520
- [Integer to Roman](https://leetcode.com/problems/integer-to-roman/)
1621
- [Unique Paths](https://leetcode.com/problems/unique-paths/)
1722
- [Gray Code](https://leetcode.com/problems/gray-code/)
1823
- [Perfect Squares](https://leetcode.com/problems/perfect-squares/)
1924
- [Next Greater Element III](https://leetcode.com/problems/next-greater-element-iii/)
25+
- [Angle Between Hands of a Clock](https://leetcode.com/problems/angle-between-hands-of-a-clock/)
26+
- [String to Integer (atoi)](https://leetcode.com/problems/string-to-integer-atoi/)
27+
- [The k<sup>th</sup> Factor of n](https://leetcode.com/problems/the-kth-factor-of-n/)
28+
- [Queries on Number of Points Inside a Circle](https://leetcode.com/problems/queries-on-number-of-points-inside-a-circle/)
29+
- [Product of Array Except Self](https://leetcode.com/problems/product-of-array-except-self/)
30+
- [Multiply Strings](https://leetcode.com/problems/multiply-strings/)
31+
- [Encode and Decode TinyURL](https://leetcode.com/problems/encode-and-decode-tinyurl/)
32+
- [Integer Break](https://leetcode.com/problems/integer-break/)
33+
2034

2135
## Hard
2236
- [Permutation Sequence](https://leetcode.com/problems/permutation-sequence/)
37+
- [Basic Calculator](https://leetcode.com/problems/basic-calculator/)
38+
- [Max Points on a Line](https://leetcode.com/problems/max-points-on-a-line/)
39+
- [Number of Digit One](https://leetcode.com/problems/number-of-digit-one/)
2340

assignments/15-linkedlist.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
- [Reorder List](https://leetcode.com/problems/reorder-list/) `leetcode`
2222
- [Remove Nth Node From End of List](https://leetcode.com/problems/remove-nth-node-from-end-of-list/) `leetcode` `HSBC`
2323
- [Swapping Nodes in a Linked List](https://leetcode.com/problems/swapping-nodes-in-a-linked-list/) `leetcode`
24-
- [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) `leetcode` `TCS`
24+
- [Add Two Numbers](https://leetcode.com/problems/add-two-numbers/) `leetcode` `TCS` `Amazon` `Microsoft` `Facebook` `Qualcomm`
2525
- [Add Two Numbers II](https://leetcode.com/problems/add-two-numbers-ii/) `leetcode`
2626
- [Linked List Cycle II](https://leetcode.com/problems/linked-list-cycle-ii/) `leetcode`
2727
- [Flatten a Multilevel Doubly Linked List](https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/) `leetcode` `Amazon`

assignments/16-stack-queue.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
- [Inorder Traversal (Iterative)](https://practice.geeksforgeeks.org/problems/inorder-traversal-iterative/1/) `GFG`
1313
- [Preorder traversal (Iterative)](https://practice.geeksforgeeks.org/problems/preorder-traversal-iterative/1/) `GFG`
1414
- [Flood fill](https://leetcode.com/problems/flood-fill/) `leetcode`
15-
15+
- [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) `leetcode`
1616
## Medium
1717
- [Design a Stack With Increment Operation](https://leetcode.com/problems/design-a-stack-with-increment-operation/) `leetcode`
1818
- [Minimum Add to Make Parentheses Valid](https://leetcode.com/problems/minimum-add-to-make-parentheses-valid/) `leetcode`
@@ -32,7 +32,6 @@
3232
- [Snake and Ladders](https://leetcode.com/problems/snakes-and-ladders/) `leetcode`
3333

3434
## Hard
35-
- [Implement Queue using Stacks](https://leetcode.com/problems/implement-queue-using-stacks/) `leetcode`
3635
- [Longest Valid Parantheses](https://leetcode.com/problems/longest-valid-parentheses/) `leetcode`
3736
- [Sliding window maximum](https://leetcode.com/problems/sliding-window-maximum/) `leetcode`
3837
- [Brace Expansion II](https://leetcode.com/problems/brace-expansion-ii/) `leetcode`

lectures/09-linear search/code/src/com/kunal/MaxWealth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public int maximumWealth(int[][] accounts) {
99
// account = col
1010
int ans = Integer.MIN_VALUE;
1111
for (int[] ints : accounts) {
12-
// when you start a new col, take a new sum for that row
12+
// when you start a new row, take a new sum for that row
1313
int sum = 0;
1414
for (int anInt : ints) {
1515
sum += anInt;
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3.83 MB
Binary file not shown.

lectures/17-oop/code/src/com/kunal/generics/CustomArrayList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ public class CustomArrayList {
77

88
private int[] data;
99
private static int DEFAULT_SIZE = 10;
10-
private int size = 0; // also working as inde value
10+
private int size = 0; // also working as index value
1111

1212
public CustomArrayList() {
1313
this.data = new int[DEFAULT_SIZE];

lectures/17-oop/code/src/com/kunal/generics/CustomGenArrayList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ public class CustomGenArrayList<T> {
99

1010
private Object[] data;
1111
private static int DEFAULT_SIZE = 10;
12-
private int size = 0; // also working as inde value
12+
private int size = 0; // also working as index value
1313

1414
public CustomGenArrayList() {
1515
data = new Object[DEFAULT_SIZE];

lectures/18-linkedlist/code/src/com/kunal/CLL.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ public void display() {
2828
if (head != null) {
2929
do {
3030
System.out.print(node.val + " -> ");
31-
node = node.next;
31+
if (node.next != null) {
32+
node = node.next;
33+
}
3234
} while (node != head);
3335
}
3436
System.out.println("HEAD");

lectures/18-linkedlist/code/src/com/kunal/LL.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public int deleteLast() {
7878
int val = tail.value;
7979
tail = secondLast;
8080
tail.next = null;
81+
size--;
8182
return val;
8283
}
8384

@@ -93,7 +94,7 @@ public int delete(int index) {
9394
int val = prev.next.value;
9495

9596
prev.next = prev.next.next;
96-
97+
size--;
9798
return val;
9899
}
99100

0 commit comments

Comments
 (0)