17 Incredibly simple ways to create an awesome Interview Experience
Interview Experience
-
Upload
nitin-nilesh -
Category
Documents
-
view
5 -
download
0
description
Transcript of Interview Experience
-
AfterwritingGATEpaper,IwassureofnotexpectinganythingfromtheGATEthentheweirderanswerkeysofdifferentinstitutesaddedtheconfusionandpressure.So,Idecidedtofocusonmyjobandwasbusywiththeboringtestingworkinoffice.11thMarchsomebodypostedlinkofGATEresultIcheckedmineitwasAIR320,a400KWshockIwasstunnedformovementIcheckedwithfewforvalidityoftheresultthenrestof4daysgoesprayingtomakeitreal.
Thencometheday15thMarch,andyesitwassameAIR320IwasincloudnineandsureofgettingatleastIITH/IITG.But,withinfewdaysIfoundmyselfinthecloudofsorrowsanddisgustaspeoplefromlastyearwithhigherrankwerehavingmorescorethanme.Butthen,myseniorsandfriendssuggestedmetofocusonwritten/interviewsoIdid.
FirstconfrontwasIITM(M.S),Icrackedthewrittenanddeliveredwellininterviewbutwasnotshortlisted.
SecondbattlewasofIITK:waitingticketandnighmaretotravelfromMumbaitoKanpur.Iwritewellinwrittenandwasamongthetop.SeniorsthereweresayingthatIamhavingverygoodchancesnow.Thencomethemovement.Ienteredinroom:1.Howwillyoufindshortestpathinweightedgraph?Dijkstrasalgorithm.2.Whatiscomplexity?Iactedstreetsmarthere,wastryingtospendmoretimeonquestionasIwascomfortable.IsaiduiniterativeapproachwewouldneedO(n^2)forfindingshortestpathbetweenallpairs.3.Isthereanyotherapproach?ActedlikerecallingandthensaidSirIguesstheuseofpriorityqueqeswouldmakeitfaster,wecanachieveitinO(nlogn).Satisfied4.Whatisdifferencebetweenheapandpriorityqueqe?Wecanuseheapaspriorityqueqe.BurHeapshouldthenprovidethefunctionforinsertion,reportmin,extractMin.Satisfied.5.ForreportMinandinsertwhichdatastructureshouldbeused?andwhatwouldbecomplexity?(thiswasaquestionfromwrittentest).Ianswerditwrongintest.IsaidMinheapandcomplexityforinsertionO(logn)&forreportMin:O(logn).But,againIwaswrong.TheytriedtogivemehintbutIwasnotabletogetit.CorrectanswerwaswecanuseanarrayandaminvariableandeverytimeweinsertelementjustcheckitwithcurrentminandupdatetheminvaraccordinglyThiswasexplainedtomebySwapnilafterinterview.
6.IsitabletohaveinsertioninO(1)?YeswecoulduseFibonacciheap.
7.IfwehaveanDSinwhichinsertionanddeleteMinisO(1)thenwhatwoulditsuse?WecouldusetheinsertionofnelementinO(n)inthatDSandthenwecouldapplydeleteMin()ntimetogetsortedarraysowecanhavethesortinginO(n).
-
8.Aretheresortingalgorithmsortinginntime?IfyouareaskingaboutasymptoticallyO(n)therearethealgorithslikebucketsortandradixsort.Butifyouaskingaboutexactlynoperationthethereisnone.
9.How?Because,theprimeoperationforsortingiscomparisonandweneedatleastO(nlogn)comparison.
10.Proveit.Iwasabouttostanduptoexplainonboard,whiledoingsoIsaidwecanproveitbyusingthedecisiontree.Theystoppedmeandaskednextquestion.
11.Areyoucomfortablewithanyothersubject?Yes,TOC.
12.IwillaskyouonlysinglequestionIssetofwellformnoisregular?(Wellformnomeans1,000propernowrittenwith,).Thiswasnighmareforme.Iwasblank.Theysaidmethatyoucanuseblackboard.Itriedbutwasnotgettingnehow.ThenIsaidsomeweiredthingthatitsnotregularwecanproveitbypumpinglemma.ThentheyexplainedmethatIamunabletouselemmaproperlyandthisisregular.Iwasdisappointed.
Wecanproveitbyformingregularexpressionforitas:
(19)^?.((09.09),*(09.09.09)?)
Iwasnotawareof?whichmeans0/1instance.
Iwasinnotsureaboutclearinginterviewbutgoodmarksinwrittenwereincreasingmyconfidence.
IITB(RA)
Nowmyeticketgetcancelwithlaststatusaswaiting4.ThankfullytherewassmespecialtrainboardedingeneralboggyanditwasemptycamesleepinginittoMumbai.On20thmorningtherewaswrittenofRA.Abittoughandsubjective,AftertestwewentforLunchinmidwaysomebodysaidIITKresultsareout.IcheckedIwasin.ThenIattendedtheRAinterviewinWebapplicationproject.1.Atablecontainsyearandcoursesinthatyearalongwithotherdetails.WritequerytoprintyearfromwhichcourseCS206wasoffered..
Selectmin(year)fromTable
-
wherecourse=CS206.2.Howcanyouuseminfunctionwithoutusinggroupby?Iwasexpectingthisquestion.Isaid,Ifyoudonotapplythegroupbyclauseitwillmakeasinglegroupofallrowswhicharefilteredoutafterwhereclause.
3.TheaskaboutmyJobexperience.Answered.
4.AskaboutS/Wscalability.Isitgoodtohavesingleserverwithmanyprocessorsortohavedifferentservers?
Itstreadoff.Ifyouhavesingleserverwithmanyprocessoritwouldbefasterbutthenavaibilitywouldbelow.Andifyouhavemultipleserversthenavaibilitywouldbemore.Buttheninternalcommunicationandroutingtherequesttoparticularserverwouldbeoverhead.Soweprefermultipleserverincaseofhightraffic.
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,DS6.Withwhichlanguagesyourcomfortable?C,C++,Java
7.Writeprogramtochecknoof1sinbinaryrepresentationofintegerwhichuseri/pWithfewhintsfromtheresideIwasabletowriteitthewaytheywanted.main()
-
{inta,count=0,t=1couta;
For(inti=0;i
-
*(base+size)=temp;
Reverse(base+1,size1)
}
}
9.Whatisprincipleofoptimality
thereare2optimalityprinciples:1.Temporal:datawhichisreferredislikelytobereferredagaininnearfuture,soitsgoodtokeepitincache.
2.Spatial:Addresslocationneartheaddresseslocationbeingaccessedarelikelytobeaccessedinnearfuturesoitsgoodtokeepblockofdataratherthansingledataelement.
10.Howpagesharinghappens?Therearedifferentcontrolbitsinpagetableentrieslikehardlockwhichmeansrespectivepageisneverswappedoutusedforkernelpages.Similarlythereferencecountismaintainedforthepagesindicatingthenoofprocessescurrentlyreferencingthepage.Sothiscountisusedinpagereplacementalgoandpageswithmorecountarenotswapped.
11.Whatareothercontrolfieldinpagetable.1.Valid/invalid:Thisindicatewhetherthepagetableentryisvalidorinvalid.Ifpagewithvalid/invalidbitsetisreferredthenpagefaultoccure.2.Dirtybit:Ifpageismodifiedthendirtybitissetindicatingthatpageneedstobewrittenback.
12.Explaintheprocessofpagefault.Whenapagewithvalid/invalidbitsetisaccessedOStrapisgenerated.Itcheckswhetheritssegmentationfaultoritsgenericpagefault.Ifitssegmentationfault,processisswappedout.IfitsgenericpagefaultthenOSwillcheckforemptypageinmainmemoryandloadtheframeintothepageandthenupdatethepagetableandrestarttheinstruction.
FewmorequestionsonOSconceptsandactivationrecordsanditwasover.
Iwasaskedtowaitandin5minute1ofpanelmembertakemeinsidewheretheygivemethewhiteslip.