make my trip placement

Embed Size (px)

DESCRIPTION

make my trip campus plcament

Citation preview

WAP to reverse a stringWAP to remove repeated occurrence of a character from string.WAP to reverse the matrix.WAP to find loop in a link listWAP to find duplicate in a fileReverse a link list. Design a data structure for a seminar room. write algorithm on some CPU scheduling related question 331 written , 2 technical interview rounds , 1 hr round and 1 managerial round. Written mostly on pointers for freshers. Technical rounds on operating System-CPU Scheduling and basic algorithm questions. Some easy puzzles were also asked.find max subarray among array of _ve and -ve elementsPuzzle questions are asked.Problems like to find no. of barbers in city etc. can be asked.. Asked to write a C code for counting words , lines , in a file Asked few SQL queries and detailed description of projectWrite a program to print 1 to n with one in sequence with one thread printing even numbers and second thread printing odd numbers.Write a java program to print numbers from 1 to 10 using 2 threads. Thread 1 should print odd and thread 2 should print Even numbers.Write a program to find duplicate elements in an array In O(n) time using O(1) extra step.Write a function which will return a char from a given encoded string from given index without decoding string. e.g. from a2bc3d4 ( means aabcbcbcdddd ) and index value is 7 means function should return c without decoding original string ?find out the subset of an array of continuous positive numbers from a larger array whose sum of of the elements is larger in comparision to other subset. eg: {1,2 5 -7, 2 5} .The two subarrays are {1,2,5} {2,5} and the ans is {1,2, 5} as its sum is larger than{2,5}Given two classes C1 and C2 which are almost same.(remember not exactly same). You want to choose best among these classes so that it can be use as key in hashmap. Question 1: Given an array with n elements consisting of numbers between 1 to n-1 with some numbers being repeated multiple times in the array. Give a result[] array as output containing all the repeated/duplicate elements.Given an array containing a sequence of numbers , you need to identify whether that sequence is Fibonacci , Arithmetic Expression or Geometric Expression============ And give its next term as output.Sorting words in a large filepseudo code for detect a loop in linked list and remove it.1. Find out the subset of an array of continuous positive numbers from a larger array whose sum of of the elements is larger in comparision to other subset. eg: {1,2 5 -7, 2 5} .The two subarrays are {1,2,5} {2,5} and the ans is {1,2, 5} as its sum is larger than{2,5}You have a 8*8 chess board and given a starting and final location of a knight.Find the shortest possible path for the knight.Given a stream of around billion numbers in an array, which has approximately only 1000 unique numbers. Print the unique numbers. Complexity should be less than O(n).Eg:Input: 1,1,1,1,.2,2,2,3,4,4,4,41111,1111,..Output : 1,2,3,4,1111Write a program to print the frequency of all words in a given paragraph. Write a program to reverse the string word wise.Write a program to explain producer consumer program using threads.(Only theory) What data structures will you use to design a garbage collector.Given a linked list with next and arbitrary pointers, clone it. Reverse a linked list in groups of n.Vertical level order traversal of a tree.Reverse the second half of the linked list in the most efficient way.Q3: Find the merging point of two linked list.Q4: Write a function to generate all possible n pairs of balanced parentheses.For example, if n=1{}for n=2{}{}{{}}1. Find minimum cost path in a Matrix i.e. return the minimum cost path to reach (m, n) from (0, 0). Each cell of the matrix represents a cost to traverse through that cell. It was based on DP.2. Simple question based on logic.3. Based on hashing or you can use map in C++. You have given two sentence A and B. Find the length of smallest substring in A that contains all characters of B.1. Merging two linked list . They asked me to write code on paper for merging both sorted and unsorted linked list.2.Add two numbers recursively. I was asked to write the whole code.3.Factorial of large number only concept. Then asked one puzzle and one or two questions from my project.1. Which data structures will you prefer to make a new language. After that a long discussion took place.2. Find the frequency of each word for a given set of huge data.3. External Sorting concept.Final was to explain Segment tree and its complexity which was asked from my project. Then general discussion on BST and he asked complexity of AVL and RB tree.1. A prisoner broke out from jail. In order to escape, he will have to jump n no. of walls and length of each wall is given. Maximum height to which prisoner can jump is given. Now since it was a rainy day all the walls are wet and when prisoner makes a jump he slips down l units. Calculate total no. of jumps he will have to make in order to escape. (Simple logical question)2. Find smallest substring which contains all characters from a given string?Input string1: This is a test stringInput string2: tistOutput: t stri3. Given a maze. Drop a mouse in the maze randomly, and place a piece of cheese in any cell. The mouse can move 4 directionsup down left rightThere are some walls on the way to block certain directions for certain position.Design an algorithm for the mouse to find the cheese.Note: the mouse does not know where he is, and where the cheese is. He cannot find x,y for the position he is right now.for instanceX X BD X DA X XD is the block with walls on 4 sides.If the mouse reaches the end of row or column, it gets the dead end.Mouse is A, cheese is B. Return true if mouse can reach the cheese else return false. A brief intro of yourself and discussion on my projects. Then he asked me about my fav. subject and language (DS and C++). Questions on OOPS (almost all the concepts were covered like polymorphism, overriding, overloading, inheritance, concept of virtual fxns etc.) He wrote a C++ code and asked me to write the output. Some questions on DS and then he asked me to write algo for reversing a linked list. Then he asked me to explain one of the questions that I had attempted in the coding round. (They just want to make sure that you know the logic).Round 4: (Technical Interview) Topics in DS that I am comfortable with and the ones with which I am not. Unfortunately this time he asked me questions from the later. They dont want a correct answer but just want to see how you approach in such questions. Questions from bit-wise operators Then he asked me to explain other one of the two questions I had attempted in coding round.