Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Nope, I would fail. And I‘m not ashamed to admit. That‘s just the typical bullshit that you don‘t need in your every day work.
Maybe regex is an exception in that it can actually be useful sometimes. But not useful enough to be a necessity to master.
What do you mean by optimize a binary search? -
"Starting with a possibility" is incorrect English. Instructions should either be verbose and well structured with plenty of examples or be rigorously grammatically correct to avoid ambiguity.
-
The others aren't very hard, excluding that I have no idea what "each type of loop" is. I'm pretty good at finding time complexity though and since it's a tree walking proof for the most part I don't need paper unless the algorithm is really big or complicated.
-
@Lensflare Well, one of the interview questions talked about taking into account all edge cases (such as start index being -1 and end index being 1 or something) and that my answer didn't take those into account but only a few, so they recommended I 'optimize' my algorithm this way.
As for work experience.. I've needed this type of stuff when writing custom and efficient search and document manipulation functions to efficiently handle millions of documents and e-mails at top speed.. just a lot of custom stuff. -
@lbfalvy Apparently answering O(n2) for a nested for loop was incorrect because of some starting initialization index, they said. I think the correct answer as O(logN).
-
@CaptainRant What are the outer and inner loop's initializer, step and repetition criteria - the stuff inside the parentheses? Log(n) would most likely be i=1 to n with *2, but other variations exist.
-
@CaptainRant "optimize" sounds wrong for me in this case. You can optimize for speed or storage used. What you have described I’d call "making it robust".
Not an expert, though 🙂
Related Rants
*looks drowsy* Ugh my head..
You know what, guys? If you can freshly and directly remember how to do this:
- calculate the time complexity for each type of loop and code structure
- knowing how to write the following regex:
"A 15-digit number starting with a possibility of a group of 1-2 digit numbers, segregated into three 5-digit numbers tuples with three different separator characters, evaluated ahead"
- mentally work out how to reverse an array's indexes (swapping algorithm) without writing anything down
- know how to optimize a binary search in your head
then kudos to you. lmao
I'm rusty. It took me a while..
rant
admittance-tests
job-hunting
struggle