Skip to main content
6 events
when toggle format what by license comment
Jun 8, 2018 at 14:14 comment added Sinc @Nemo Your comment about mixed reactions is exactly why you need to ask about the problem space. Many programmers will go for a simple working solution first, and then will decide whether to optimize. If you ask the interviewer about their expectations on that point you should gain points for the question. Depending on the interview(er) you may or may not be expected to actually take the time to try to optimize, but I would think some discussion about whether, when and how to optimize is better than actually trying it. (But I'm like a 1000 years old so I've never done a coding interview.)
Jun 8, 2018 at 1:55 comment added CJ Dennis Good point about the length of the strings. However, you should only add the additional step of comparing the string lengths if bench-marking shows there is a bottleneck there. Maybe 2048 can be done really quickly and the code is slower in other places that are more valuable to improve first.
Jun 7, 2018 at 23:59 history edited Sᴀᴍ Onᴇᴌᴀ CC BY-SA 4.0
update quotation format; add citation
Jun 7, 2018 at 23:16 comment added nemo Thank you Sinc for appreciating newbies thinking about the run time of a problem! I figured it's important to let people know how my brain is thinking about the problem . I make mistakes someone can point them out then and I understand things better! Definitely thinking about the scenario in which the solution will run is important. In interviews I've had mixed reactions from interviewers wanting either a quick solution or optimize for the best solution . So I hope to practice to get better! Cheers Thank you for your advice :D
Jun 7, 2018 at 21:54 review First posts
Jun 7, 2018 at 23:59
Jun 7, 2018 at 21:45 history answered Sinc CC BY-SA 4.0