Campus Placement Paper – Set 1

Below questions are based on experience of students from various universities(NITs, IITs, BITS, DCE and many other reputed institutes). These question will surely help you in preparing for interviews of BIG IT giants(Amazon, Microsoft, Netapp, DE Shaw, Flipkart, Snapdeal, Hosuing.com, Epic system, Zomato, Expedia etc). So get ready and try solving these questions.

Programming Questions :-

Q1. Given an array with integers 0,1,2 sort the array by swapping elements.

Q2. Given an Array of Integers, Find two elements in the array whose sum is closest to zero?

Q3. Remove Duplicate elements You are given an array of elements. Some/all of them are duplicates. Find them in 0(n) time and 0(1) space. Property of inputs – Number are in the range of 1..n where n is the limit of the array.

Q4. Queue using stack?

Q5. Merge sort and Quick sort? Complexity?

Q6. Devise an algorithm to determine the Nth-to-Last element in a singly linked list of unknown length. If N = 0, then your algorithm must return the last element. You should parse the list only once.

Q7. Give a one-line expression to test whether an unsigned int is a power of two.

Q8. Given a sorted integer array (e.g. 1 2 3 4 5). It is shifted by k pos to right (e.g. for k=2 and the new array is (4 5 1 2 3). Find what’s the value of k based on the new array in O(lg n).

Q9. You are given a pointer to a node (not the tail node) in a singly linked list. Delete that node from the linked list.

Q10. Find angle between hour and minute hands?

Q11. Frequency count of all words present in file?

Q12. Reverse the input string without using extra memory? (Don’t use recursion here because it uses stack)?

Q13. Remove spaces form the given input string?

Q14. Write your own strcat() function , strcmp() function?

Q15. Write a program to merge two arrays in sorted order, so that if an integer is in both the
arrays, it gets added into the final array only once?

You will find solution of many questions on crazyforcode. Just explore various sections. Happy coding !!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Post Navigation