Mapa mental
Alg-Cats
Conteúdo do mapa
Alg-Cats
FIND IN Certain Order
SUB-SET
FIND MAX PATH
FIND MIN PATH
Search, Min, Max
- ARRAY
- Unique
- Sorted Rotated
- Binary Search - Variation mid+1-1 check
- Array Req: Array sorted Low to High except Pivot point; case1: if Start < End return 0 case2: Only one direction goto RIGHT case edge: MID > MID+1 return MID+1 MID < MID-1 return MID // Binary search way while (right >= left) { int mid = left + (right - left) / 2; if (nums[mid] > nums[mid + 1]) { return nums[mid + 1]; } if (nums[mid - 1] > nums[mid]) { return nums[mid]; } if (nums[mid] > nums[0]) { left = mid + 1; } else { right = mid - 1; } }
- Binary Search - Variation mid+1-1 check
- Sorted
- Binary Search
- Sorted Rotated
- Duplicate
- Sorted
- Binary Search - Variation equals check
- Sorted Rotated
- -Ve, +Ves
- +Ve's
- > len / 2
- 3 Sections
- Sorted
- Characters
- Unique
- LINKED LIST
- ARRAY
Pattern Matching
- Longest Palindrom
- RegEx Match
- #1: if current char . or alpha match #2: if * -----#2.1 copy previous value -----#2.2 override if previous match
- Iteration
- boolean T[][] = new boolean[text.length + 1][pattern.length + 1]; T[0][0] = true; //Deals with patterns like a* or a*b* or a*b*c* for (int i = 1; i < T[0].length; i++) { if (pattern[i-1] == '*') { T[0][i] = T[0][i - 2]; } } for (int i = 1; i < T.length; i++) { for (int j = 1; j < T[0].length; j++) { if (pattern[j - 1] == '.' || pattern[j - 1] == text[i - 1]) { T[i][j] = T[i-1][j-1]; } else if (pattern[j - 1] == '*') { T[i][j] = T[i][j - 2]; if (pattern[j-2] == '.' || pattern[j - 2] == text[i - 1]) { T[i][j] = T[i][j] | T[i - 1][j]; } } else { T[i][j] = false; } } } return T[text.length][pattern.length];
- Recursion
Data structure
- Array
- String
Solve Method
- Iteration
- Recursion
Dynamic Programming
Informações
- Descrição
- DS-Alg Mapa Mental sobre Alg-Cats, criado por Pradhap Ganesan em 19-10-2019.
- Criado por
- Pradhap Ganesan
- Visualizações
- 0
- Avaliação