You are on page 1of 3

Persistent Technical Paper 4

1. To find complexity of Linked list .Singly circular ordered list is there if m elements are to be inserted what will be the complexity of time. i. O(m*n . ii. O(m*(m!n . iii. O((m!n *log(m!n ". #d$acency matrix %uestion to find shortest path #ns&'. #()*+ #,m (m,""m ),*,. +, /here m&infinity0 1ind shortest path from ( to +. 2. 1orest 3 Tree %uestion to find total no of nodes 1 n4(p!" #5S ". n4p!". 2. n4p. etc same %uestion is in Sahni 6 think go thru it. 7. 6nfix to 8ostfix expression Of #!(*()!* 9+!1 :#5S&#()*!*+9!1! ; %uestion is not confirm but pattern is of same type *(<S 1. =uery from 5a>athe Select fname0lname from employee where eno in (select eno from works4 on where pno&(select * from pro$ect ? what is the output . ". # %uery is gi>en eg. Select name from employee where salary&salary. They ask whether %uery runs or not so $ust check it. #ns&=uery 6n>alid 2. /hat is the main use of ( 3 (! trees in database #ns& 1or %ueries 7. %uestion on Left outer @oin 3 1ull outer @oin. 1or both Aariables are gi>en 3 in options relationship is gi>en to find whiche>er ha>e greater tuples. -. To sa>e space which option is better . Options are i. /rite all $oin operation than select than pro$ect. ii. /rite all $oin operation than pro$ect than select. iii. /rite all $oin operation in between select 3 pro$ect. OS 1. Bsing LCB how many page faults are generated. ", pages are there #ns&. page fault ". match the column Options i. semaphore i ii. <onitor ii

iii. *eadlock iii i>. <utual +xclusion i>. 6> 2. One %uestion on file locking. Scenario is gi>en #ns 1. 8ro>ide indefinite locking 7. 8re>ent intermediate file #ccess. ((oth 1 3 " -. 6f there are n processes 3 each process waits p time in waiting state then )8B utiliDation is (options are 1. n(14p ". (14p to the power n #5S (not sure 2. 14np. 7. n*p -. # critical section is #ns & a set of instruction which is shared by many process. Eeneral 1. 8robability to find digits which not contain ' between 1,, to FFF #ns&1G9"". 8acket switching 3 )ircuit Switching some diff are there #ns& )S take more time to established circuit. 2. # file ha>e 2 bits for char such type of %uestion #ns& "',,, or "7,,,()onfused 7. Hash table %uestion #ns&". # hash table has siDe of 11 3 data filled in its positions like :20-0'0F0.; how many comparison s ha>e made if data is not found in the list in worst caseI. Options& i. " ii. . iii. 11 i>. 1 -. 1rom the set :a0b0c0d0e0f; find no. of arrangements for 2 alphabets with no data repeated. #5S&2.,. OC for 7 alpha #5S&'",. ) 8rogramming 1. #rray pointer is pass ". String (uffer =uestion 2. String )oncatenate()har *s10)har *s" : )har bufJ1,,,K? (ufJ,K&null? Strcat(buf0s1 ? Strcat(buf0s" ? Ceturn buf? ; i. should not return pointer to local >ariable. ii. 5othing /rong in this function. iii. 6t donLt work if length exceeds 1,,, char. i>. +rror in this code. 7. foo( call how many times #ns&-,-,. 1or(i&1?iM&1,,?i!! 1or ($&1?$M&1,,?$!!

1oo( ? 8rogramming Section ( mainly ask " programs. 1. Occurrence of letters in String. Eet string from N( of any length 3 print letters coming maximum time first than second largestO.. i.e in descending order. Their re%uirementP They want that u make this program thru linked list if u do that than it is well n good. <ust allocate memory dynamically. Bse proper assumptions 3 )omments e>erywhere this will add more ad>antage .use in all programs. Output look like if u enter string aababbbcba b - times a 7 times c 1 times $ust like that HintP <ake array of "-. chars. 5ow Scan the string pick each char and according to itLs acsii >alue increment that index >alue at last u ha>e an array which ha>e counter for each alphabet. Sort this array 3 display. ". Sparse <atrix #ddition. # structure of sparse matrix is gi>en. Qou ha>e to create a function sparseadd to add " sparse matrices Structure is some how like Struct Sparsematrix : int row ? int col ? int >al? Sparse<atrix *next? ; Qou ha>e to made function to add two sparse matrices. 1unction signature like Sparse<atrix Sparse#dd(Sparse<atrix s10Sparse<atrix s"

You might also like