Professional Documents
Culture Documents
subject:
DS test submission: "Date" "YOURNAME" SLOT1 Data science/software
email to: harsh.yadav@cron-labs.com
ques 1 - You are having an array of 5s and 7s. Modify the array to arrange 5s on
left side and 7s on right side of the array.
input - 57555775
output- 55555777
ques 2 - reverse the numerical array without changing the position of characters.
input - [1,2,A,8,G,3,X,M,9]
output- [9,3,A,8,G,2,X,M,1]
ques 3 - Reverse the whole string without reversing the individual words in it.
Words are separated by exclamation mark.
input - I!am!a!coder
output- coder!a!am!I
ques 4 - Given an array A[] of N positive integers which can contain integers from
0 to N where elements can be repeated or can be absent from the array.
Your task is to count frequency of all elements from 1 to N.
input- 2033445
output- 01221
ques 5 - Given an array arr[] and a number K where K is smaller than size of array,
the task is to find the Kth smallest element in the given array.
It is given that all array elements are distinct.
761245
input - k=3
output- 4