You are on page 1of 2

send results in notepad\txt only.If using .IPYNB ,convert it to pdf before sending.

Format of output:Question followed by code and output

***you can use any compiler,language*****

TURN YOUR WEBCAM AND SCREEN SHARING**


DURATION:1 HOUR

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

ques 6 - If you have a dictionary like this ->


n1={"a1":10,"b2":20,"c3":30}.Increment values of all the keys ?
input- {"a1":10,"b2":20,"c3":30}
output- {"a1":11,"b2":21,"c3":31}

You might also like