This problem is related to string handling and manipulation. So the original string which is sent to Cybertron is encrypted in the new string which comprises the letters followed by each time it has occurred in the original string.
Three dinos decide to play a game. In one move, one of the outer dinos can hop into a spot between the other two. Help them maximise their duration of play.
There are several sticks each 1 inch long. Your job is to form a rectangle with the biggest possible area, using these sticks as the perimeter.
Pair in C++ STL is used to combine two values having different or same data types. It stores two different values as a single element. Tuple unlike pair can be used to combine two or more than two values having different or same data types.
Every Chrome extension has a JSON-formatted manifest file, named manifest.json, that provides important information for the Chrome extension.
Given an array consisting of only 1s and 0s, sort this binary array such that all 0s are on the left and all 1s are on the right.
The Tower of Hanoi is a mathematical puzzle (game) consisting of three rods and a number of disks.
The objective of the puzzle is to move all the disks from the first rod (A) to the next rod (B) using the auxiliary rod (C).
The number of possible Binary Search Trees with n keys is Catalan Number (Cn). You could learn about Catalan Number & Binomial Coefficient.
Catalan numbers (Cn) are a sequence of natural numbers. Nth Catalan number has applications in many counting problems.
The recomputations in calculating binomial coefficient (nCr) can be avoided by exploiting optimal substructure and overlapping subproblems