Earlier quoted context omitted.
> Technical interviews (at least in companies such as facebook and google) are usually much easier than competitive programming problems. Probably. But if you are a student outside U.S where the opportunities are an order of magnitude less the only way to even land an interview with these companies is by doing competitive programming. Google selects students through APAC test in Asia where you have to be top n% in th…
> All the persons I know of in my country who works at Google or Facebook got their job through competitive programming. Are any of them bad developers?
Competitive Programmer's Handbook (2017) [pdf]
121–127 of 127 posts
Re: Competitive Programmer's Handbook (2017) [pdf]
#122Re: Competitive Programmer's Handbook (2017) [pdf]
#123I see in the comments that some people conflate competitive programming and technical interviews. Technical interviews (at least in companies such as facebook and google) are usually much easier than competitive programming problems. The problem you find on leetcode for interview preparation would be considered beginner problems in competitions such as google code jam.
A programming contest, even if you just do the easy problems, can be a more enjoyable way to practice for interviews than reading a book or even going through online puzzles like those on LeetCode.
Re: Competitive Programmer's Handbook (2017) [pdf]
#124Earlier quoted context omitted.
I'm not sure that you avoid errors by forcing yourself to write short code. With C macros.
Here's a real world example: https://github.com/LoupVaillant/Monocypher/commit/d7bb73f65a... So I have this function, `crypto_wipe()` that wipes memory regions with `volatile` so the compiler doesn't optimises it away. In the link above I was using it thus: crypto_stuff(stuff_ctx *ctx) { // stuff crypto_wipe(ctx, sizeof(ctx)); // BUUUG!! } See the bug? I should have dereferenced `ctx` in the sizeof operator. As it wa…
Re: Competitive Programmer's Handbook (2017) [pdf]
#125Earlier quoted context omitted.
Here's a real world example: https://github.com/LoupVaillant/Monocypher/commit/d7bb73f65a... So I have this function, `crypto_wipe()` that wipes memory regions with `volatile` so the compiler doesn't optimises it away. In the link above I was using it thus: crypto_stuff(stuff_ctx *ctx) { // stuff crypto_wipe(ctx, sizeof(ctx)); // BUUUG!! } See the bug? I should have dereferenced `ctx` in the sizeof operator. As it wa…
In this case the use of macros may increase the readability or assurance of the code, still there are a lot of cases where macros can easily lead to bugs: https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?pa...
Re: Competitive Programmer's Handbook (2017) [pdf]
#126This book gets to the point fast. But for the fundamentals this book serves more as a refresher than a course. Skiena and Sedgewick both have excellent books and online courses if you need more depth. A nice thing about this book is that the full TeX source is on github.
Re: Competitive Programmer's Handbook (2017) [pdf]
#127Earlier quoted context omitted.
Sure, that might be the case. But for those funny needs I have a "crazy algorithm course" from a top 10 university, ACM ICPC and Kaggle or other paid competitions I can attend. I am not going to go through such an interview doing simple silly things I did dozen times before at FB/Goog/etc., when I know I can use that time to work on something more interesting, or just for relaxing after a hard work/enjoying accomplis…
What was the problem they asked you to solve? Out of curiosity