A child is running up a staircase with N steps and can hop either 1, 2 or 3 steps at a time. Implement a method to count how many possible ways the child can run-up up the stairs.
A program to do basic string compression. For a character that is consecutively repeated more than once, replace consecutive duplicate occurrences with the count of repetitions. In C++ language.
In this tutorial, we learn how to check whether a given string is palindrome or not using recursion in C++ language. Time complexity: O(n), Auxiliary space: O(n).