κ·Έλν μκ³ λ¦¬μ¦Intermediate
κΉμ΄ μ°μ νμ (DFS)
μμΆμ νκΈ° μ μ κ° κ²½λ‘λ₯Ό λ°λΌ κ°λ₯ν ν κΉμ΄ λ€μ΄κ°μ κ·Έλνλ₯Ό νμν©λλ€. μ€νμ΄λ μ¬κ·λ₯Ό μ¬μ©νμ¬ κ΅¬νλμ΄ μ¬κ·μ λ¬Έμ μ μμ°μ€λ½μ΅λλ€. κ²½λ‘ μ°ΎκΈ°, μν κ°μ§, μμ μ λ ¬, λ―Έλ‘ μμ±μ μ¬μ©λ©λλ€.
#graph#traversal#recursive
Complexity Analysis
Time (Average)
O(V + E)Expected case performance
Space
O(V)Memory requirements
Time (Best)
O(V + E)Best case performance
Time (Worst)
O(V + E)Worst case performance
π CLRS Reference
Introduction to Algorithmsβ’Chapter 22β’Section 22.3
Step: 1 / 0
500ms
SlowFast
Keyboard Shortcuts
Space Play/Pauseβ β StepR Reset1-4 Speed
Real-time Statistics
Algorithm Performance Metrics
Progress0%
Comparisons
0
Swaps
0
Array Accesses
0
Steps
1/ 0
Algorithm Visualization
Step 1 of 0
Initialize array to begin
Default
Comparing
Swapped
Sorted
Code Execution
Currently executing
Previously executed
Implementation