<commit_before># interviewed

A collection of problems (and solutions to them) I found during tech interviews

## General tips

- Know how to calculate complexity (time and space) of everything you do
- Ask as many questions as needed
- Speak out what you are thinking about
- EVERYTHING is about tradeoffs: brute force might be ok in small sets... Know when the brute force complexity will surpass a better approach (e.g. sorting might cost you something, but a sorted input might allow a faster algorithm)

## Cool Links & Resources

- [Hacking a Google Interview Course @ MIT](http://courses.csail.mit.edu/iap/interview)
- [Become a better programmer with programming challenges](http://macgyverdev.blogspot.se/2014/04/become-better-programmer-with.html)
- [Tech Interview Tips by Google Recruiters](https://www.google.com/about/careers/lifeatgoogle/hangouts-on-air-google-recruiters-share-technical-interview-tips.html)
- [Candidate Coaching by Google](http://www.youtube.com/watch?v=oWbUtlUhwa8)
- (Eternally Confuzzled)[http://www.eternallyconfuzzled.com/]: explanations on data structures and algorithms
- [MIT Lectures on CS](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures)
- [TopCoder's Tutorial on Sorting](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=sorting)
- [TopCoder's Math for Programmers](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=math_for_topcoders)
- [TopCoder's How to Find a Solution](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=findSolution)
- [Binary Indexed Tree](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binaryIndexedTrees)
- [How should I prepare system design questions for Google/Facebook Interview?](http://www.quora.com/How-should-I-prepare-system-design-questions-for-Google-Facebook-Interview)
- Joel on Software: [The Guerrilla Guide to Interviewing (version 3.0)](http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html)
- [Failing at Google Interviews](http://alexbowe.com/failing-at-google-interviews/)
- [VisuAlgo](http://www.comp.nus.edu.sg/~stevenha/visualization/index.html): visualising data structures and algorithms through animation
- [Five Essential Phone Screen Questions](https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions)
- [Hired In Thech](http://www.hiredintech.com): Preparation plans (free & paid) for interviews

## Interesting Tech Articles

- Facebook: [Building Mobile-First Infrastructure for Messenger](https://code.facebook.com/posts/820258981365363/building-mobile-first-infrastructure-for-messenger/)
- [The two-eggs problem](http://www.datagenetics.com/blog/july22012/index.html)
- [Why Are Facebook, Digg, And Twitter So Hard To Scale?](http://highscalability.com/blog/2009/10/13/why-are-facebook-digg-and-twitter-so-hard-to-scale.html): Pull on Demand vs Push on Change approaches
- [You Can’t Sacrifice Partition Tolerance](http://codahale.com/you-cant-sacrifice-partition-tolerance/)
- [20 controversial programming opinions](http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/)
- [Leaky Abstractions](http://www.joelonsoftware.com/articles/LeakyAbstractions.html)
- [Notes on Distributed Systems for Young Bloods](http://www.somethingsimilar.com/2013/01/14/notes-on-distributed-systems-for-young-bloods/)
- [Distributed Systems Class @ Columbia University](https://roxanageambasu.github.io/ds-class/)
- [How to shuffle songs @ Spotify](https://labs.spotify.com/2014/02/28/how-to-shuffle-songs)
- [TAO: Facebook’s Distributed Data Store for the Social Graph](https://www.usenix.org/conference/atc13/technical-sessions/presentation/bronson): Talk by <NAME>
- [Fundamentals of Data Compression](http://bertolami.com/index.php?engine=blog&content=posts&detail=fundamentals-of-data-compression), an introduction by Bertolami

# Interesting data structures

- [Disjoint Sets](http://en.wikipedia.org/wiki/Disjoint-set_data_structure)
- [Bloom Filters](https://en.wikipedia.org/wiki/Bloom_filter)
- [Fenwick Trees](https://en.wikipedia.org/wiki/Fenwick_tree)<commit_msg>add article on finding the k-th element<commit_after># interviewed

A collection of problems (and solutions to them) I found during tech interviews

## General tips

- Know how to calculate complexity (time and space) of everything you do
- Ask as many questions as needed
- Speak out what you are thinking about
- EVERYTHING is about tradeoffs: brute force might be ok in small sets... Know when the brute force complexity will surpass a better approach (e.g. sorting might cost you something, but a sorted input might allow a faster algorithm)

## Cool Links & Resources

- [Hacking a Google Interview Course @ MIT](http://courses.csail.mit.edu/iap/interview)
- [Become a better programmer with programming challenges](http://macgyverdev.blogspot.se/2014/04/become-better-programmer-with.html)
- [Tech Interview Tips by Google Recruiters](https://www.google.com/about/careers/lifeatgoogle/hangouts-on-air-google-recruiters-share-technical-interview-tips.html)
- [Candidate Coaching by Google](http://www.youtube.com/watch?v=oWbUtlUhwa8)
- (Eternally Confuzzled)[http://www.eternallyconfuzzled.com/]: explanations on data structures and algorithms
- [MIT Lectures on CS](http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-046j-introduction-to-algorithms-sma-5503-fall-2005/video-lectures)
- [TopCoder's Tutorial on Sorting](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=sorting)
- [TopCoder's Math for Programmers](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=math_for_topcoders)
- [TopCoder's How to Find a Solution](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=findSolution)
- [Binary Indexed Tree](http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=binaryIndexedTrees)
- [How should I prepare system design questions for Google/Facebook Interview?](http://www.quora.com/How-should-I-prepare-system-design-questions-for-Google-Facebook-Interview)
- Joel on Software: [The Guerrilla Guide to Interviewing (version 3.0)](http://www.joelonsoftware.com/articles/GuerrillaInterviewing3.html)
- [Failing at Google Interviews](http://alexbowe.com/failing-at-google-interviews/)
- [VisuAlgo](http://www.comp.nus.edu.sg/~stevenha/visualization/index.html): visualising data structures and algorithms through animation
- [Five Essential Phone Screen Questions](https://sites.google.com/site/steveyegge2/five-essential-phone-screen-questions)
- [Hired In Thech](http://www.hiredintech.com): Preparation plans (free & paid) for interviews

## Interesting Tech Articles

- Facebook: [Building Mobile-First Infrastructure for Messenger](https://code.facebook.com/posts/820258981365363/building-mobile-first-infrastructure-for-messenger/)
- [The two-eggs problem](http://www.datagenetics.com/blog/july22012/index.html)
- [Why Are Facebook, Digg, And Twitter So Hard To Scale?](http://highscalability.com/blog/2009/10/13/why-are-facebook-digg-and-twitter-so-hard-to-scale.html): Pull on Demand vs Push on Change approaches
- [You Can’t Sacrifice Partition Tolerance](http://codahale.com/you-cant-sacrifice-partition-tolerance/)
- [20 controversial programming opinions](http://programmers.blogoverflow.com/2012/08/20-controversial-programming-opinions/)
- [Leaky Abstractions](http://www.joelonsoftware.com/articles/LeakyAbstractions.html)
- [Notes on Distributed Systems for Young Bloods](http://www.somethingsimilar.com/2013/01/14/notes-on-distributed-systems-for-young-bloods/)
- [Distributed Systems Class @ Columbia University](https://roxanageambasu.github.io/ds-class/)
- [How to shuffle songs @ Spotify](https://labs.spotify.com/2014/02/28/how-to-shuffle-songs)
- [TAO: Facebook’s Distributed Data Store for the Social Graph](https://www.usenix.org/conference/atc13/technical-sessions/presentation/bronson): Talk by <NAME>
- [Fundamentals of Data Compression](http://bertolami.com/index.php?engine=blog&content=posts&detail=fundamentals-of-data-compression), an introduction by Bertolami
- [Finding the k-th element in a (unsorted) list](http://blog.teamleadnet.com/2012/07/quick-select-algorithm-find-kth-element.html)

# Interesting data structures

- [Disjoint Sets](http://en.wikipedia.org/wiki/Disjoint-set_data_structure)
- [Bloom Filters](https://en.wikipedia.org/wiki/Bloom_filter)
- [Fenwick Trees](https://en.wikipedia.org/wiki/Fenwick_tree)
{'fraction_non_alphanumeric': 0.13222849083215796, 'fraction_numerical': 0.021156558533145273, 'mean_word_length': 5.495419847328244, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 16, 'lorem ipsum': 0, 'www.': 22, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '275933', 'n_tokens_mistral': 2914, 'n_tokens_neox': 2659, 'n_words': 549}