-
(KOR) 로또
Problem – ⭐️⭐️⭐️⭐️⭐️ https://www.acmicpc.net/problem/6603 Solution Key Points To avoid using the numbers that’s already used, the iteration under backtracking method should start from idx , not 0. ex) for(int i=idx;i<numList.size();i++){ StringBuilder is much faster than System.out.println Read more
-
(KOR)연산자 끼워넣기
Problem – ⭐️⭐️⭐️⭐️⭐️ https://www.acmicpc.net/problem/14888 Solution Key Points For backtracking method, we need to pass the changed value like the res or numIdx to recursive method as an argument. For full search problems, it’s likely to use DFS Read more
-
(KOR) 스도쿠
Problem – ⭐️⭐️⭐️⭐️ https://www.acmicpc.net/problem/2580 Solution Key Points Using an array list (zeroList) which stores all empty nodes. Using this, we only need to iterate through this list, NOT the whole grid(9×9). This helps avoid Timeout error. Using a flag(isEnded) to escape when we found the solution. This is required because we only have to print… Read more
-
(KOR) N-Queen
Problem – ⭐️⭐️⭐️⭐️⭐️ https://www.acmicpc.net/problem/9663 Solution Key Points The solve method did not require nested for loops like for(int i=0;..){ for(int j=0..){.Instead, we could just pass ‘row’ as an argument and check that row only, because each row can only have 1 Queen at maximum. Read more
-
(KOR) N과 M(4)
Problem – ⭐️⭐️⭐️ https://www.acmicpc.net/problem/15652 Solution Key Points Use StringBuilder to print all outputs instead of System.out.println Backtracking removes the case that we already checked Read more
-
(KOR) N과 M(3)
Problem – ⭐️⭐️⭐️ https://www.acmicpc.net/problem/15651 Solution Key Points Use StringBuilder to print all outputs instead of System.out.println Backtracking removes the case that we already checked Read more
- AI (1)
- Algorithm (96)
- Ideas (26)
- Problems (79)
- Backtracking (12)
- Dynamic Programming (14)
- Greedy (1)
- Queue & Stack (14)
- BFS & DFS (9)
- Recursion (6)
- _Others (33)
- Blockchain (5)
- Database (1)
- DevOps (1)
- Java (40)
- Linux (1)
- Network (1)
- Operating System (2)
- Programming (1)
- Spring (9)
- System Design (24)
- Uncategorized (1)
- Web (2)
Availability (2) Binary Search Tree (2) Consistency (2) Design Doc (1) DFS (3) Durability (2) Dynamic Programming (4) Graph (7) HashMap (3) Linked List (3) List (2) Monotonic (3) MSA (2) Performance (2) Prefix Sum (4) Rate Limiter (3) Replication (2) Scalability (3) Sliding Window (8) System Design (22) Thread (2) Trie (3) Two Pointers (3) Union-Find (6) WebSocket (2) ⭐️ (6) ⭐️⭐️ (4) ⭐️⭐️⭐️ (11) ⭐️⭐️⭐️⭐️ (24) ⭐️⭐️⭐️⭐️⭐️ (41)
