Coding interview: Difference between revisions

Content deleted Content added
Added the addition of Modern Evolutions to the Coding interview (past 5 years)
Tags: Reverted Visual edit
mNo edit summary
 
(33 intermediate revisions by 17 users not shown)
Line 1:
{{Short description|Problem-based job interview technique}}
{{Use mdy dates|date=May 2015}}
A '''coding interview''', '''technical interview''', '''programming interview''' or '''Microsoft interview''' is a technical problem-based [[job interview]] technique to assess potentialapplicants employeesfor a [[computer programming]] or [[software development]] position. TheModern techniquecoding wasinterview techniques were pioneered by [[Microsoft]], andduring subsequentlythe 1990s<ref name="time-2012" /> and developedadopted by other large technology companies including [[Amazon.com|Amazon]], [[Facebook]], and [[Google]].<ref>[http://ifdefined.com/blog/post/Google-interview.aspx Applicants blog] after Google interview. {{Webarchive|url=https://web.archive.org/web/20110313021040/http://ifdefined.com/blog/post/Google-interview.aspx |date=March 13, 2011 }}</ref><ref name=":0">[https://www.npr.org/templates/story/story.php?storyId=1405340 Job Interviews Get Creative, NPR 2003]. Retrieved from the World Wide Web on January 16, 2006.</ref> Coding interviews test candidates' technical knowledge, coding ability, problem solving skills, and creativity, typically on a [[whiteboard]]. Candidates usually have a degree in [[computer science]], [[information science]], [[computer engineering]] or [[electrical engineering]], and are asked to solve [[Mathematical programming|programming]] problems, [[algorithms]], or [[puzzle]]s.<ref>{{citation |title=Programming Interviews Exposed: Secrets to Landing Your Next Job |author=John Mongan |date=December 11, 2023 |edition=2nd |isbn=978-0-470-12167-2 |publisher=Wrox |url-access=registration |url=https://archive.org/details/programminginter00mong_0 }}</ref><ref name=ctci>{{Cite book|title=[[Cracking the Coding Interview|Cracking the coding interview : 189 programming questions and solutions]]|last=McDowell|year=2015|first=Gayle Laakmann|author-link=Gayle Laakmann McDowell|isbn=978-0-9847828-5-7|edition=6th|___location=Palo Alto, CA|oclc=913477191}}</ref> Coding interviews are typically conducted in-person or virtually.
 
 
==Innovation==
The Microsoft's Interviewinterview style was a pioneerdistinctive in that it was aboutconcerned technical knowledge, problem solving and creativity as opposed to the [[Job interview#Behavioral interview questions|goal and weaknesses interviews]] most companies used at the time. Initially based on [[Bill Gates]]'s obsession with puzzles, many of the puzzles presented during interviews started off being [[Fermi problem]]s, or sometimes logic problems, and have eventually transitioned over the years into questions relevant to programming:.<ref name="Poundstone">{{cite book | last = Poundstone | author-link = William Poundstone | first = William | title = How Would You Move Mount Fuji | ___location = Boston | publisher = [[Little, Brown and Company]] | year = 2003 | pages = [https://archive.org/details/howwouldyoumovem00poun/page/50 50–90] | isbn = 0-316-91916-0 | url = https://archive.org/details/howwouldyoumovem00poun/page/50 }}</ref> As [[William Poundstone]] wrote, "Puzzles test competitive edge as well as intelligence. Like business or football, a logic puzzle divides the world into winners and losers. You either get the answer, or you don't. … Winning has to matter."<ref name="Poundstone" />{{rp|62}}
 
== Questions ==
<blockquote>Puzzles test competitive edge as well as intelligence. Like business or football, a logic puzzle divides the world into winners and losers. You either get the answer, or you don't... Winning has to matter.<ref>Poundstone, page 62.</ref></blockquote>
The questions asked during thea Microsoftcoding Interviewinterview are crafted to determine a candidate's problem solving, coding and design abilities. Eccentric questions (such as ''"Which of the fifty states would you remove?''") test a candidate's ability to come to a decision and articulate it.<ref> name=Poundstone, page 67.</ref>{{rp|67}} Candidates answering questions should consider the use of technology in the present and future, and [[user scenarios]]. Some questions involve projects that the candidate has worked on in the past.
 
TheA Microsoftcoding Interviewinterview is intended to seek out creative thinkers and those who can adapt their solutions to rapidly changing and dynamic scenarios.<ref name=":0" />
=== Example interview questions ===
The questions asked during the Microsoft Interview are crafted to determine a candidate's problem solving, coding and design abilities. Eccentric questions (such as ''Which of the fifty states would you remove?'') test a candidate's ability to come to a decision and articulate it.<ref>Poundstone, page 67.</ref> Candidates answering questions should consider the use of technology in the present and future, and [[user scenarios]]. Some questions involve projects that the candidate has worked on in the past.
 
Typical questions that a candidate might be asked to answer during the second-round interview include:<ref>{{Cite web |date=4 September 2024 |title=Coding Interview Questions |url=https://interviewquestionanswers.net/technical/java-interview-questions/ |publisher=OmniJobs}}</ref>
The Microsoft Interview is intended to seek out creative thinkers and those who can adapt their solutions to rapidly changing and dynamic scenarios.
 
Typical questions that a candidate might be asked to answer during the second-round interview include:
 
* What is the cosine law and how do you use this in real life situations?
* Design a GPS navigation unit for a hiker.
* Design a communication device for Canadian [[park rangersranger]]s.
* Shift all elements of a [[circular buffer|circular array]] by ''k'' bytes, using no extra memory.
 
===Programming language===
If the interviewing position has specific [[programming language]] requirements, the candidate is expected to know those languages and solve the questions with it. If the interview is for general programming or development position, a thorough knowledge of one mainstream language such as [[C (programming language)|C]], [[C++]], [[C Sharp (programming language)|C#]], or [[Java (programming language)|Java]] may be enough to get by.{{Citation needed|date=February 2011}} An interviewer may also allow use of other popular languages, such as [[JavaScript]], [[PHP]], or [[Perl]].
 
====Manhole cover question====
[[File:Open Manhole and Cover Mid-City New Orleans.jpg|thumb|A round manhole and its cover]]
The question of why [[manhole covers]] are typically round (in some countries) was made famous by [[Microsoft]] when they began asking it as a job-interview question.<ref name="Microsoft Puzzle Book">{{cite book| last = Poundstone| first = William| title = How Would You Move Mount Fuji? Microsoft's Cult of the Puzzle – How the World's Smartest Company Selects the Most Creative Thinkers| publisher = Little, Brown| year = 2003| isbn = 0-316-91916-0| url = https://archive.org/details/howwouldyoumovem00poun}}</ref><ref>{{cite web|last=Davis |first=Jim |url=http://www.joblossguide.com/2009/02/why-are-manhole-covers-round_10.html |title=Why Are Manhole Covers Round? |publisher=Joblossguide.com |date=2009-02-10 |access-date=2011-04-08 |url-status=dead |archive-url=https://web.archive.org/web/20110612064454/http://www.joblossguide.com/2009/02/why-are-manhole-covers-round_10.html |archive-date=June 12, 2011 |df=mdy }}</ref> Originally meant as a psychological assessment of how one approaches a question with more than one correct answer, the problem has produced a number of alternative explanations, from the [[tautology (rhetoric)|tautological]] ("Manhole covers are round because manholes are round.")<ref name="Microsoft Puzzle Book" /> to the philosophical.
 
Reasons for the shape include:
* A round manhole cover cannot fall through its circular opening, whereas a square manhole cover may fall in if it were inserted diagonally in the hole. The existence of a "lip" holding up the lid means that the underlying hole is smaller than the cover, so that other shapes might suffice. (A [[Reuleaux triangle]] or other [[curve of constant width]] would also serve this purpose, but round covers are much easier to manufacture.)
* Round tubes are the strongest and most material-efficient shape against the compression of the earth around them, and so it is natural that the cover of a round tube assume a circular shape.
* A round manhole cover has a smaller surface than a square one, thus less material is needed to cast the manhole cover, meaning lower cost.
* The bearing surfaces of manhole frames and covers are machined to assure flatness and prevent them from becoming dislodged by traffic. Round castings are much easier to machine using a lathe.
* Circular covers do not need to be rotated to align with the manhole.
* A round manhole cover can be more easily moved by being rolled.
* A round manhole cover can be easily locked in place with a quarter turn (as is done in countries like France), which makes them hard to open without a special tool. Lockable covers do not have to be made as heavy, because traffic passing over them cannot lift them up by suction.
 
The practice of asking these sorts of so-called [[lateral thinking]] questions was later formally discouraged at Microsoft.
 
== Modernization of the Code Interview ==
 
=== Competitive Realm & Third Parties ===
The standard interview of a large company quickly evolved to become a standardized process, thus it became both competitive and optimizable for potential candidates. Similar to college standardized tests, third party companies emerged in order to profit off the higher demand for successful interviews, as it would lead to a very high paying salary for a winning candidate. The first player in profiting from this new prep culture was [[Gayle Laakmann McDowell]] and her book: [[Cracking the Coding Interview]], which outlined strategies and study material for those wishing to receive offers from [[FAANG]], or large tech companies<ref>{{Cite web |title=Amazon software development engineer interview: the only post you'll need to read |url=https://igotanoffer.com/blogs/tech/amazon-software-development-engineer-interview |access-date=2022-05-06 |website=IGotAnOffer |language=en}}</ref>.
 
Meanwhile in recent years, companies like [https://www.algoexpert.io/ AlgoExpert], [https://leetcode.com/ LeetCode], and other sites promised candidates an edge in the competitive interview scene with a growing database of problems that could similarly match a question one would receive in a true interview. These new code-prepping platforms primarily focused on Computer Science [[Algorithm|Algorithms]], a tricky and dynamic abstraction of problems that may occur on an actual job site. Understanding efficiencies ([[Run-time complexity|Run-time complexities]]), and the coverage of [[Edge case|edge cases]] (points where the code may break) are two features that an interviewer will prioritize most in a suitable response; therefore, they are a primary grading criteria on these testing sites.
 
=== Virtual Interviewing ===
Kickstarted during the [[2020 pandemic|COVID-19 Pandemic]], the concept of a true whiteboard interview began to fade as interviewing in a virtual space proved to be more feasible to companies. They not only provided a safer interviewing interviewing environment for both parties, but also made interviewing multiple candidates more efficient for large companies. Similar to emerging prep-websites, other companies have also begun to provide services of online interviewing platforms, which allows code-sharing between the interviewer and interviewee as well as running the written code of the candidate for instant validation. One of the first to pioneer the space and be adopted by large fintech firms in New York City was [https://www.hirevue.com/ HireVue]<ref>{{Cite web |title=Campus Recruitment Sofware: Early Talent Acquistion |url=https://www.hirevue.com/solutions/campus-recruiting-software |access-date=2022-05-06 |website=hirevue.com |language=en}}</ref>.
 
===Interview resourcesManhole test ===
Microsoft popularized the question of why [[manhole covers]] are typically round (in some countries) when they began asking it as a job interview question.<ref name="Poundstone" /> Originally meant as a psychological assessment of how one approaches a question with more than one correct answer, the problem has produced a number of alternative explanations, from the [[tautology (rhetoric)|tautological]] ("Manhole covers are round because manholes are round.")<ref name="Poundstone" /> to the philosophical.
Microsoft provides a list of suggested reading to prepare for its interview. Notable examples include:{{citation needed|date=January 2020}}<!-- A source should indicate that Microsoft has listed these books, otherwise this section should be reevaluated-->
 
By 2012, the practice of asking [[lateral thinking]] questions had declined at companies including Microsoft and Google. A study by [[San Francisco State University]] associate professor of psychology Chris Wright found that puzzle interview questions annoyed job applicants. "Methods that had a transparent relationship between test content and job duties, such as interviews, work samples, and reference checks were perceived more favorably," Wright wrote in a research paper entitled "Why Are Manhole Covers Round? A Laboratory Study of Reactions to Puzzle Interviews". Poundstone, who had written puzzle interview guides for Microsoft and Google, referred to puzzle questions in 2012 as "a sort of fad" that lost popularity because of a lack of evidence of their effectiveness.<ref name="time-2012">{{cite magazine |last1=White |first1=Martha C. |title=No-Brainer: 'Brainteaser' Job Interview Questions Don't Work |url=https://business.time.com/2012/10/23/no-brainer-brainteaser-job-interview-questions-dont-work/ |access-date=July 4, 2022 |magazine=Time |date=October 23, 2012}}</ref>
* [[Steve McConnell|McConnell, Steve]] (2004) ''[[Code Complete]]'' ([[Microsoft Press]], 2nd ed.) {{ISBN|978-0-7356-1967-8}}
* [[Bill Gates|Gates, Bill]], Hemingway, Collins (1999) ''[[Business @ the Speed of Thought]]'' {{ISBN missing}}
* Gates, Bill (1995) ''[[The Road Ahead (Bill Gates book)|The Road Ahead]]'' {{ISBN missing}}
* [[Frederick P. Brooks, Jr.|Brooks Jr., Frederick P.]] ''[[Mythical Man-Month]]'', (Addison-Wesley, Anniversary Edition), 1995. {{ISBN |978-0-201-83595-3}}
* [[Donald Knuth|Knuth, Donald]] (1968-) ''[[The Art of Computer Programming]]'', (Addison-Wesley). {{ISBN|0-201-03801-3}}
 
==References==
{{Reflist}}
 
{{DEFAULTSORT:Microsoft Interview}}
[[Category:Microsoft culture]]
[[Category:Job interview]]