PHP Program to reverse an array | array_reverse()

array_reverse() is an inbuilt function of PHP used to reverse the array including the nested arrays. It returns the reversed array. But in the case of associative arrays of if you don't want to change the keys of the array, $key_preserve=true can be passed as a parameter to the array_reverse() function.

C++ Program to Generate all the Rotations of a String

We will discuss an easy approach to generate all the rotations of a string. Approach is simple we will concatenate the given string with itself and then we will be able to generate all the rotations. C++ Program to generate all the rotations of a given string is given below along with its algorithm.

Sorting Bank Accounts (SBANK) in C++ | SPOJ

C++ Program for the adding reversed number problem of spoj is given below. The given solution is accepted by spoj judge. Approach is simple, we will input the account number as strings and then insert them into a container such as vector and we will also store their number of occurrence in an unordered_map<string,int> where string is the key and its frequency is value. Then we will sort the elements of container and print the sorted data along with their frequency.