Technical Interview Question
Want to be one of Quixey’s earliest employees? We expect to be hiring for a programmer position very soon.
When it comes to engineering our product, we think it’s essential to hire top-notch programmers who know how to architect and maintain a beautiful codebase.
So, pretend you’re working on our production website, and you need to do the following in either Python or JavaScript:
Write a function
findInSorted(arr, x)
. It’s supposed to return the smallest index of a valuex
in an arrayarr
which, as a precondition, must be sorted from least to greatest. Or, ifarr
doesn’t contain an element equal tox
, the function returns-1
.
Email your answer to jobs@quixey.com.
Reply