HackerRank C

Digit Frequency in C – Hacker Rank Solution

Problem  Given a string, S, consisting of alphabets and digits, find the frequency of each digit in the given string. Input Format : The first line contains a string, num which is the given number. Constraints : 1<=len(num)<=1000All the elements of num are made of english alphabets and digits. Output Format : Print ten space-separated integers in a …

Digit Frequency in C – Hacker Rank Solution Read More »

Array Reversal in C – Hacker Rank Solution

Problem Given an array, of size n, reverse it.Example: If array, arr = [1,2,3,4,5], after reversing it, the array should be, arr[5,4,3,2,1]. Task Input Format : The first line contains an integer, n, denoting the size of the array. The next line contains n space-separated integers denoting the elements of the array. Constraints : 1<=n<=1000 1<=arri<=1000, where arri is the ith element of …

Array Reversal in C – Hacker Rank Solution Read More »