 StandUpDev.com/wiki

Site Tools

recursive_examples

Recursive examples

1. ALL FRACTALS (Sierpinski Triangle/Square, Koch Snowflake, Trees, Ferns, Hilbert Curve, etc.)
2. fibonacci
3. factorial
4. GCD
5. collatz sequence
6. towers of hanoi
7. eight queens problem
9. flood fill
10. palindrome detection
11. binary search
13. sum/multiply the numbers in a list
14. sum the digits of a number
15. binary tree traversal
16. maze backtracking
17. permutations
18. combinations
19. all subsets of a set
20. quick sort
21. merge sort
22. boggle
23. adding a child to a binary tree
24. validating a binary tree
25. making change with coins of various denominations
26. find out if two nodes are connected in a graph
27. editing distance/levenshtein distance
28. knapsack problem (where items have value and size/weight)
29. word ladders (least > last > lost > cost > coast > cast > cask > mask > mast > most)
30. file system directory traversal
31. number of paths through an N x N grid
32. how many ways to go up N steps if you can go 1, 2, and/or 3 steps at a time
33. find a magic index in a distinct (also, not distinct) sorted array, a magic index is i where A[i] == i
34. get the highest stack of boxes from a set of boxes with widths/depths/heights and each box's width & depth must be equal/smaller than the one below it
35. Newton's square root method 