Writing documentation headers in an interview setting should only happen if they explicitly state that you should write them, or after you ask the interviewer if you should be writing them.
From what I've seen, interviewing is evolving and focusing gradually more on realistic, practically-oriented coding, and less on Leetcode-style questions, especially as people are learning to game those.
That it also rejects some good candidates is fine, there's always more candidates for FAANG jobs. (Few competitors pay FAANG salaries.)
I feel like there should be a course for passing these exams run by ex-FAANG employees. Perhaps a bootcamp.
2. Some of these firms occasionally host coaching sessions for referrals. Ask your friends if one is currently running.
3. "You don't need H1Bs, just lower your hiring bar" is a criticism that is a bit less applicable to firms with a high hiring bar, than to firms with a low hiring bar. If you are, in fact, talent-limited, an H1B will actually cost you more than a local worker. (Lawyers, immigration sponsorship, uncertainty in whether the visa will actually arrive, aren't cheap - and FAANG does not have a reputation for exploiting their H1B hires.)
I'd like to practice this, any recommendations?
If you don't want to pay, just get the list of former questions from the internet. [1]
Many of those questions may no longer be asked, but if you can ace them, you should have few problems with similar questions/variants thereof.
This is not a skillset that develops from doing your day job. You have to deliberately practice to get good at this.
[1] https://www.interviewcake.com/google-interview-questions
Here's what I like about interviews:
(1) I get to talk about myself and how great I am without people rolling their eyes at me.
(2) I get to solve a fun puzzle with:
(2)(a) A defined answer.
(2)(b) That I never have to maintain.
(2)(c) With a potential financial windfall at the end.
If you happen to do coding exercises at all, they are just basic tasks like implement a linked list data structure, count the number of words on a file and such.
Answer some trivia about the language you are supposed to use, e.g. when should you use a struct in C#.
Luckly only startups over here are somehow into SV hiring culture, which still leaves plenty of others with job offers available.
Looks like you got stung by the confusion between binary tree and B-Tree (and B+Trees).
1. The b in btree isn't binary.
2. Databases use B+Trees.
3. binary trees are almost worthless.
Interval trees reduce to Binary Search Trees when the nodes can't overlap. Most markup DOMs (in browsers, WYSIWYG editors, etc.) are held as an Interval-tree ADT which is actually implemented by a BST.
Also, Red-Black trees specifically are used in many database clients to implement an in-memory write-back cache of a database table, as the combination of performance requirements for flushing batches of writes to the DB, and reading back arbitrary keys that were written to the cache, make these BSTs nearly optimal for this use-case.
But yes, DBMSes themselves don't tend to use BSTs for much. Maybe as a query-plan-AST term-rewriting-phase ADT.
Interval trees are degenerate R-Trees which can be implemented using GiST which is itself a btree.
>Also, Red-Black trees specifically are used in many database clients to implement an in-memory write-back cache of a database table, as the combination of performance requirements for flushing batches of writes to the DB, and reading back arbitrary keys that were written to the cache, make these BSTs nearly optimal for this use-case.
Got a source? I'd like to read up on this use case.
>But yes, DBMSes themselves don't tend to use BSTs for much. Maybe as a query-plan-AST term-rewriting-phase ADT.
Postgres' source does indeed have a red black tree in it:
I come from a CS background and struggle with these too.
The big problem I have is this performance stuff is often barely relevant to the position. You need to know the principle of a BST. Unless you're building a database working in a unique scenario, actually traversing it going to be done by some library.