-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommanPattern.txt
50 lines (19 loc) · 1.81 KB
/
commanPattern.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
Repo Link: https://github.com/ankit485803/MyAdvDSA_PathwayToCP
recursion funct -- TC formula = total calls * work done in each call
Here,
we'll mention all the concepts that we learn and observe on the practice the DSA prob from the various topics
1. Three prob (Book Alloc + Painter Parition + Aggressive Cows) -- learn min(max), max(min) to ans = range,then apply Binary Search
2. Sorting Algo: yah DSA ques (LeetCode) ko solve karne ke liye use nahi karte h, but Interview / HR mai ques puch sakta h
ankit maje karo enjoy tumhara ye topics complete h pahle (GATE SAMASHER se kiye ho Sem2 IIT Patna mai) only recap from the short notes okkkk bhai
3. The one-pass algorithm for sorting colors, commonly known as the Dutch National Flag (DNF) algorithm,
efficiently sorts an array containing three distinct values (in this case, 0s, 1s, and 2s) in a single traversal.
4. In permutation of string ques - if Constraints in ques given -- lowecase + uppercase + specailChar + digits. In this case hnko nahi pata h kitna freq hai, then
then it's solutin hai aap ek unordered map create karo and store <char, int> will read in HASTING chapter
search s1 permutation in s2 using WINDOW BASED SEARCHING tecniq
5. HASTING (map, set) -- jiska kam h Complex ko O(1) CONSTANT bana dena, (ankit use this cocnept in twoSum prob- leetcode.com/problems/two-sum/)
6. Slow-Fast pointer approach (in LinkedList chapter ) but ankit solve in FindDup, This method is used to detect the CYCLE in linked list
method1: BruteForce -- ans = (size/2 + 1)
method2: SLOW-FAST POINTER approach to find middle of LL, this approach is also used in next topic: CYCLE-DETECTION in LL
I write this ppoint on 7th Jan 2025 (Tueday) from NESAC ISRO Meghalaya Centre
To learn:-
imp function to convert int to str: to_string(count)