singhsanket143 / FrontendDSA

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Frontend DSA Class Plan

Classes Date
1 Advanced Problems On Arrays Jun, 30
2 Advanced Problem On Arrays and Objects July, 1
3 Doubt Class July, 3
4 Time And Space Complexity July, 4
5 How To Solve Recursion Problems July, 6
6 Advanced Problem Solving On Recursion July, 8
7 Advanced Problem Solving On Recursion July, 9
8 Doubt Solving July, 10
9 Algorithms: Binary Search Part-1 July, 11
10 Algorithms: Binary Search Part-2 July, 15
11 Doubt Solving July, 17
12 Revision: Problem Solving Binary Search July, 18
13 Problem Solving: Binary Search on Answer July, 20
14 Problem Solving: Binary Search on Answer (Contd.) July, 21
15 Revision on Merge Sort July, 25

1. Advanced Problems On Arrays

June, 30
Notes
anagram.js Two strings are called anagrams of each other if they are permutations of each other.

2. Advanced Problem On Arrays and Objects

July, 1
Notes
frequencyInAString.js Print the frequency of each unique character in a string.
firstNonRepeating.js Find the first non-repeating character in a string.
subarraysum0.js Given an array of integers, check if there is any subarray with of it's elements as zero.

3. Doubt Class

July, 3
Notes
shiftElementToLast.js Given an array of integers, of length n, modify the array such that all the negative numbers are shifted to the last.

4. Time And Space Complexity

July, 4
Notes
Complexity.js Complexity Examples.
RecursiveComplexity.js Recursive Complexity Examples

5. How To Solve Recursion Problems

July, 6
Notes1, Notes2
CSES Problem Set Dice Combinations
CSES Problem Set Removing Digits
Count the number of ways to reach the destination in a Maze

6. Advanced Problem Solving On Recursion

July, 8
Notes
ratInAMaze.js Rat in a maze
nQueens.js N Queens

7. Advanced Problem Solving On Recursion

July, 9
Notes
sudoku.js Sudoku Solver
Knightstour.js Knights Tour

8. Doubt Solving

July, 10
combinationsum.js
CSES Problem Set Coin Combinations I
CSES Problem Set Coin Combinations II

9. Algorithms: Binary Search Part-1

July, 11
Notes Binary Search,
UPPER BOUND,
LOWER BOUND

10 Algorithms: Binary Search Part-2

July, 15
Notes
1. Given a sorted array and an element X, check if the element is repeated.
2. Given a sorted array where every element is present twice except one element. Find the single occurring element. (Element is not given.)
3. Given an array of length n, where elements are sorted, all the elements are unique but one element is present twice, and the elements lie in the range [0, n-2]. Find the repeating element.
Home Work What if instead of dividing the array into two parts, we start dividing the array into 3 parts. As (log3n < log2n) ?

11 Doubt Solving

July, 17
Notes XOR
N Queens
Subsequence Vs Subset
1. Given a sorted rotated array, find the min element in less than O(n).

12 Revision: Problem Solving Binary Search

July, 18
Notes
1. Find three unique set(s) having an equal sum.
2. In an array find a pair with a given sum
3. Total Triplets
Home Work H/W gave on Jul 15:

Do you think it’s a good idea to divide your search space into 3 parts (Ternary Search)?

Dividing it into 2 parts makes sense because it gives you less number of comparisons, but, How many comparisons?

If we divide merge sort into 3 subarrays instead of 2, How many comparisons will increase? Calculate the factor by which it will increase.

13 Problem Solving: Binary Search on Answer

July, 20
Notes Binary Search Problems - Medium - Hard
1. Codeforces: Pair of Topics. Find the number of good pairs of topics.
2. SPOJ: Not a Triangle. Triplet that does not form a triangle.
3. SPOJ: Find the total number of sextuples.
Home Work Knowing that triplets need to be compared, can we somehow use binary search to solve the question?

14 Problem Solving: Binary Search on Answer (Contd.)

July, 21
Notes
4. SPOJ: Subset Sums.
5. Given a number x, calculate the integer part of the square root of x.
6. Now, calculate with more precision, up to 3 decimal places.
Home Work Write the code for handling the precision.

15 Revision on Merge Sort

July, 25
Notes Merge Sort
mergesort.js
mergetwosortedarray.js
invcnt.js, SPOJ Inversion Count
Double Inversion Count
1. Given 2 sorted arrays of different sizes, combine them such that the combined array is sorted. (Merge 2 sorted arrays)
2. Given an unsorted array, can we sort it, using the same algorithm?
3. Why do we only divide the array into 2 parts and not in 3 in merge sort?
Stackoverflow Merge Sort Time & Space Complexity.

About


Languages

Language:JavaScript 97.8%Language:C++ 2.2%