Simple Problems To Be Solved Using Recursion
Numbers
- Compute the number a raised to the power n where n is a positive integer.
- Determine floor(log2(n)) for a positive integer, n.
Strings
- Determine the length of a 0-terminated string of characters
- Determine if a string of characters is a palindrome (reads the same forwards and backwards).
Arrays
- Compute the sum of the numbers in an array
- Find the largest/smallest number in an array
- Search an array for a value
- Write the elements of an array in reverse without changing the contents of the array
- Reverse the elements of an array/list
- Replace a value with another value throughout an array
- Find an element in a sorted array using binary search
- Delete an element from an array
- Determine how many numbers in an array are larger/smaller than a given number.
- Partition an array putting all values less than a given value on the left and all values greater than a given value on the right.
Linked Lists
- Write the elements of a linked list in reverse order
- Reverse the elements of a linked list
- Find an element in an ordered/unordered linked list
Sorting
- Insert a number into a sorted list/array
- Merge two sorted lists into a single sorted list.
- Sorts - Insert Sort, Merge Sort, Quick Sort, etc.
Binary Trees
- return the sum of all the node values in a binary tree of numbers
- count the number of nodes in binary tree
- count the number of internal nodes in binary tree
- Determine the depth of a binary tree
- Determine the average path length of a binary tree.
- Write the nodes of a binary tree in inorder, preorder and postorder.
Advanced
- Solve the Tower of Hanoi problem
- Solve a Maze
Top of this page
Home page 
