0% found this document useful (0 votes)
80 views

Interview Coding Questions

The document provides instructions for submitting solutions to data science test questions. It specifies that solutions should be sent as a PDF or text file, with the question followed by code and output. It also provides 6 sample questions - modifying an array to arrange values, reversing arrays while preserving character positions, reversing a string without reversing individual words, counting frequencies of numbers in an array, finding the kth smallest element in an array, and incrementing all values in a dictionary. The submission is to be emailed by a given deadline and includes the candidate's name and slot number.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views

Interview Coding Questions

The document provides instructions for submitting solutions to data science test questions. It specifies that solutions should be sent as a PDF or text file, with the question followed by code and output. It also provides 6 sample questions - modifying an array to arrange values, reversing arrays while preserving character positions, reversing a string without reversing individual words, counting frequencies of numbers in an array, finding the kth smallest element in an array, and incrementing all values in a dictionary. The submission is to be emailed by a given deadline and includes the candidate's name and slot number.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 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