Você está na página 1de 5

AfterwritingGATEpaper,IwassureofnotexpectinganythingfromtheGATEthentheweirderanswer

keysofdifferentinstitutesaddedtheconfusionandpressure.So,Idecidedtofocusonmyjobandwas
busywiththeboringtestingworkinoffice.11thMarchsomebodypostedlinkofGATEresultIchecked
mineitwasAIR320,a400KWshockIwasstunnedformovementIcheckedwithfewforvalidityofthe
resultthenrestof4daysgoesprayingtomakeitreal.
Thencometheday15thMarch,andyesitwassameAIR320Iwasincloudnineandsureofgettingat
leastIITH/IITG.But,withinfewdaysIfoundmyselfinthecloudofsorrowsanddisgustaspeoplefrom
lastyearwithhigherrankwerehavingmorescorethanme.Butthen,myseniorsandfriendssuggested
metofocusonwritten/interviewsoIdid.
FirstconfrontwasIITM(M.S),Icrackedthewrittenanddeliveredwellininterviewbutwasnot
shortlisted.
SecondbattlewasofIITK:waitingticketandnighmaretotravelfromMumbaitoKanpur.Iwritewellin
writtenandwasamongthetop.SeniorsthereweresayingthatIamhavingverygoodchancesnow.
Thencomethemovement.Ienteredinroom:
1.Howwillyoufindshortestpathinweightedgraph?
Dijkstrasalgorithm.
2.Whatiscomplexity?
Iactedstreetsmarthere,wastryingtospendmoretimeonquestionasIwascomfortable.Isaiduin
iterativeapproachwewouldneedO(n^2)forfindingshortestpathbetweenallpairs.
3.Isthereanyotherapproach?
ActedlikerecallingandthensaidSirIguesstheuseofpriorityqueqeswouldmakeitfaster,wecan
achieveitinO(nlogn).Satisfied
4.Whatisdifferencebetweenheapandpriorityqueqe?
Wecanuseheapaspriorityqueqe.BurHeapshouldthenprovidethefunctionforinsertion,reportmin,
extractMin.Satisfied.
5.ForreportMinandinsertwhichdatastructureshouldbeused?andwhatwouldbecomplexity?(this
wasaquestionfromwrittentest).Ianswerditwrongintest.
IsaidMinheapandcomplexityforinsertionO(logn)&forreportMin:O(logn).But,againIwaswrong.
TheytriedtogivemehintbutIwasnotabletogetit.Correctanswerwaswecanuseanarrayandamin
variableandeverytimeweinsertelementjustcheckitwithcurrentminandupdatetheminvar
accordinglyThiswasexplainedtomebySwapnilafterinterview.
6.IsitabletohaveinsertioninO(1)?
YeswecoulduseFibonacciheap.

7.IfwehaveanDSinwhichinsertionanddeleteMinisO(1)thenwhatwoulditsuse?
WecouldusetheinsertionofnelementinO(n)inthatDSandthenwecouldapplydeleteMin()ntime
togetsortedarraysowecanhavethesortinginO(n).

8.Aretheresortingalgorithmsortinginntime?
IfyouareaskingaboutasymptoticallyO(n)therearethealgorithslikebucketsortandradixsort.Butif
youaskingaboutexactlynoperationthethereisnone.
9.How?
Because,theprimeoperationforsortingiscomparisonandweneedatleastO(nlogn)comparison.
10.Proveit.
Iwasabouttostanduptoexplainonboard,whiledoingsoIsaidwecanproveitbyusingthedecision
tree.Theystoppedmeandaskednextquestion.
11.Areyoucomfortablewithanyothersubject?
Yes,TOC.
12.IwillaskyouonlysinglequestionIssetofwellformnoisregular?(Wellformnomeans1,000
propernowrittenwith,).
Thiswasnighmareforme.Iwasblank.Theysaidmethatyoucanuseblackboard.Itriedbutwasnot
gettingnehow.ThenIsaidsomeweiredthingthatitsnotregularwecanproveitbypumpinglemma.
ThentheyexplainedmethatIamunabletouselemmaproperlyandthisisregular.Iwasdisappointed.
Wecanproveitbyformingregularexpressionforitas:
(19)^?.((09.09),*(09.09.09)?)
Iwasnotawareof?whichmeans0/1instance.

Iwasinnotsureaboutclearinginterviewbutgoodmarksinwrittenwereincreasingmyconfidence.

IITB(RA)
Nowmyeticketgetcancelwithlaststatusaswaiting4.Thankfullytherewassmespecialtrainboarded
ingeneralboggyanditwasemptycamesleepinginittoMumbai.
On20thmorningtherewaswrittenofRA.Abittoughandsubjective,AftertestwewentforLunchin
midwaysomebodysaidIITKresultsareout.IcheckedIwasin.ThenIattendedtheRAinterviewin
Webapplicationproject.
1.Atablecontainsyearandcoursesinthatyearalongwithotherdetails.Writequerytoprintyearfrom
whichcourseCS206wasoffered..
Selectmin(year)fromTable

wherecourse=CS206.
2.Howcanyouuseminfunctionwithoutusinggroupby?
Iwasexpectingthisquestion.Isaid,Ifyoudonotapplythegroupbyclauseitwillmakeasinglegroup
ofallrowswhicharefilteredoutafterwhereclause.
3.TheaskaboutmyJobexperience.
Answered.
4.AskaboutS/Wscalability.Isitgoodtohavesingleserverwithmanyprocessorsortohavedifferent
servers?
Itstreadoff.Ifyouhavesingleserverwithmanyprocessoritwouldbefasterbutthenavaibilitywould
below.Andifyouhavemultipleserversthenavaibilitywouldbemore.Buttheninternal
communicationandroutingtherequesttoparticularserverwouldbeoverhead.Soweprefermultiple
serverincaseofhightraffic.
5.FewmorequestionaboutJSPandall.
Ianswered
IwasselectedinIITB(RA)
BARC.
Iwaschillandwasoutoftension,
1.Explainyourproject.
Didwell.
2.AskedmetowritesomequerybasedonDBofmyproject.
Didit.
3.WhatisWebservices?Howitworks.
Webservicesareusedtolettwodifferentapplicationtocommunicateirrespectiveofthereplatforms.
XML/SOAPareusedforthesame..
4.WhatareACIDproperty?
Explainedwiththeexamples.
5.Listyourfavsubjects.
OS,DB,TOC,Descrete,DS
6.Withwhichlanguagesyourcomfortable?
C,C++,Java
7.Writeprogramtochecknoof1sinbinaryrepresentationofintegerwhichuseri/p
WithfewhintsfromtheresideIwasabletowriteitthewaytheywanted.
main()

{
inta,count=0,t=1
cout<<Enterinteger;
Cin>>a;
For(inti=0;i<a.lenght()*8;i++)
{
if(a&t)
count++;
t=t<<1;
}
cout<<count;
}
8.Writearecursiveprogramtoreversearray.
Wasabletowriteprogramwithfewcrossquestionfromthereside.
Voidmain()
{
Inta[10];
Cout<<Enterarray:;
For(inti=0;i<10;i++)
cin>>a[i];
Reverse(a,10);
}
Voidreverse(int*base,intsize)
{
Staticintlenght=10;
If(!size<length/2)
{
Inttemp=*base;
*base=*(base+size)

*(base+size)=temp;
Reverse(base+1,size1)
}
}
9.Whatisprincipleofoptimality
thereare2optimalityprinciples:
1.Temporal:datawhichisreferredislikelytobereferredagaininnearfuture,soitsgoodtokeepitin
cache.
2.Spatial:Addresslocationneartheaddresseslocationbeingaccessedarelikelytobeaccessedinnear
futuresoitsgoodtokeepblockofdataratherthansingledataelement.
10.Howpagesharinghappens?
Therearedifferentcontrolbitsinpagetableentrieslikehardlockwhichmeansrespectivepageis
neverswappedoutusedforkernelpages.Similarlythereferencecountismaintainedforthepages
indicatingthenoofprocessescurrentlyreferencingthepage.Sothiscountisusedinpagereplacement
algoandpageswithmorecountarenotswapped.
11.Whatareothercontrolfieldinpagetable.
1.Valid/invalid:Thisindicatewhetherthepagetableentryisvalidorinvalid.Ifpagewithvalid/invalid
bitsetisreferredthenpagefaultoccure.
2.Dirtybit:Ifpageismodifiedthendirtybitissetindicatingthatpageneedstobewrittenback.
12.Explaintheprocessofpagefault.
Whenapagewithvalid/invalidbitsetisaccessedOStrapisgenerated.Itcheckswhetherits
segmentationfaultoritsgenericpagefault.
Ifitssegmentationfault,processisswappedout.
IfitsgenericpagefaultthenOSwillcheckforemptypageinmainmemoryandloadtheframeintothe
pageandthenupdatethepagetableandrestarttheinstruction.
FewmorequestionsonOSconceptsandactivationrecordsanditwasover.
Iwasaskedtowaitandin5minute1ofpanelmembertakemeinsidewheretheygivemethewhite
slip.

Você também pode gostar