Click here to Skip to main content
12,398,225 members (53,423 online)

Welcome to the Lounge

   

For lazing about and discussing anything in a software developer's life that takes your fancy except programming questions.

Technical discussions are encouraged, but click here to ask your programming question.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Rajesh R Subramanian18-Oct-12 21:41
memberRajesh R Subramanian18-Oct-12 21:41 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Jan Steyn18-Oct-12 22:41
memberJan Steyn18-Oct-12 22:41 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Norm .net18-Oct-12 21:42
groupNorm .net18-Oct-12 21:42 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Ranjan.D18-Oct-12 21:46
memberRanjan.D18-Oct-12 21:46 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Norm .net18-Oct-12 23:04
groupNorm .net18-Oct-12 23:04 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
V.18-Oct-12 21:51
memberV.18-Oct-12 21:51 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Rajesh R Subramanian18-Oct-12 21:57
memberRajesh R Subramanian18-Oct-12 21:57 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
peterchen18-Oct-12 21:51
memberpeterchen18-Oct-12 21:51 
Amarnath S wrote:
Some candidates want to store all numbers in an array, then sort that array, and get the largest two numbers


That's the immediate solution that comes to mind, I'd do this unless it's performance criticial (it takes a while before a std::sort<int> becomes notably slower than a linear search)), because it's just one line of code. Scales well with "we also need the smalles ones", "today, the top 5".

Database - that's the immediate solution if they are already stored in a database.

These candidates are not bad. Your questions might not be precise enough.

This is actually a good thing: you can differentiate between candidates who draw their own conclusions, and those that ask for clarification / confirmation.
It is an indicator of the candidates non-code skills, but not a fault per se.




Let them present their solution, see if they can follow through (I'd expect at least the select statement, a reference to a standard sort algorithm, or the description of an sort algorithm and how they'd implement it, respectively). Then ask for a more specific solution: "Can you do that without an array, reading the numbers from the console?"

Note that jsut asking "Can you do that without an array" may have candidates stumped what your intentions are - and that's not useful. You don't want "lightbulb" answers, you want them talking about code.

GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Rajesh R Subramanian18-Oct-12 22:01
memberRajesh R Subramanian18-Oct-12 22:01 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
peterchen18-Oct-12 23:05
memberpeterchen18-Oct-12 23:05 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Rajesh R Subramanian19-Oct-12 18:22
memberRajesh R Subramanian19-Oct-12 18:22 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
jschell19-Oct-12 10:13
memberjschell19-Oct-12 10:13 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Rajesh R Subramanian19-Oct-12 18:31
memberRajesh R Subramanian19-Oct-12 18:31 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
jschell20-Oct-12 4:39
memberjschell20-Oct-12 4:39 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Amarnath S18-Oct-12 22:03
memberAmarnath S18-Oct-12 22:03 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
V.18-Oct-12 21:56
memberV.18-Oct-12 21:56 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Amarnath S18-Oct-12 22:20
memberAmarnath S18-Oct-12 22:20 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
jschell19-Oct-12 10:20
memberjschell19-Oct-12 10:20 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
_Josh_18-Oct-12 22:16
member_Josh_18-Oct-12 22:16 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Mark Wallace18-Oct-12 22:44
memberMark Wallace18-Oct-12 22:44 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
BobJanova18-Oct-12 23:23
memberBobJanova18-Oct-12 23:23 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Amarnath S18-Oct-12 23:42
memberAmarnath S18-Oct-12 23:42 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
BobJanova19-Oct-12 1:05
memberBobJanova19-Oct-12 1:05 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Guirec Le Bars18-Oct-12 23:43
memberGuirec Le Bars18-Oct-12 23:43 
GeneralRe: Why do candidates give complicated solutions to simple problems? Pin
Amarnath S18-Oct-12 23:49
memberAmarnath S18-Oct-12 23:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 26 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid