Você está na página 1de 2

Informatica Placement Paper 2011

written 25 question 45 min Data structures and algoosss need to be strong heap bst sorted and unsorted array paging concept frm OS deadlocks trashing

subjective test 1. find the output of main() { int tmp; for(i=0;i<9;i++) { tmp=fork(); if(tmp>0) break; printf("Hello"); } } 2. swap two strings 3. find the error main() { char *str1,*str2; strcpy(str1,"hello"); strcpy(str2,"world"); } 4. write some code in c but don't use new where I commited mistake 5. Learn sql and diff between corelating query & joint queries 6. rest few ques on error and outputs of good level involving various concepts 7. learn about p_thread in c interview was based on ur written score and the concept u applied in subjective test.

Interview 1. suppose u have the following list a1, a2, a3....., an in ascending order because of virus this list got corrupted and u have this list now ak, ak+1,.....an, a1, a2, ...... ak-1 find the position where a1 is coming to recover the list. Don't use brute force and do this in log(n) complexity. 2. suppose u have this list

a1, a2, a3, .....an u need to find max((a1+1)*a2*a3....*an,a1*( a2+1)*a3*......*an,........,a1*a2*........*(an+1)) give the algo for the same.

Você também pode gostar