Tuesday, January 29, 2008

Some project ideas in C++

Here is a collection of project ideas that can be easily implemented in c++ to try your hands at the game.. I will list them in order of difficulty (low to high)
  1. Basic operator overloading - try creating as many as possible combinations of function name and rest of the function signature - purely syntactical exercise.
  2. Create a function that can convert an "int" type into a "string" containing the Binary representation and vice-versa.
  3. Implement a rotated array solver - a rotated array means the elements of a "sorted" array are rotated and wrapped around from last position to 0th by rotating factor - 'r'
    1. So after rotation, the array's element Ai will be at ( ( i + r ) % arraylength ). Now suppose you are given such an array, which is already rotated by some unknown rotation factor - 'r', create a function to bring the array to original sorted form without using sorting directly. Keep in mind performance parameters in terms of speed and memory and elegance of code.