Ask Blinders
Yesterday
1100
Why Pronouns shit captured US ? I don’t see this anywhere else
Working Parents
Yesterday
374
How to relocate out of Blue areas?
India
Yesterday
3420
Why is it so G*damn difficult to move money out of India
AMA
2d
3483
I have worked at TikTok US core tech for 3 years. AMA.
2024 Presidential Election
Yesterday
1472
Uh oh: President Trump leads Biden 49% to 43% in a two-way race.
Hi, I am preparing from Leetcode for Google frontend engineering position using Javascript language. But Javascript doesn't have common implementations of useful stuff like Priority queues, Treemaps etc that's there in Java. In Java the solution becomes very short as I don't need to reimplement the Treemap implementation, but with Javascript my solution size will increase considerably. So how should I prepare? 1. Should I switch to Java in interview? 2. Can I write pseudocode in javascript instead of actually reimplementing stuff like Priority queues, Treemaps etc TC: 20LPA YOE: 4 #leetcode #interview #google #frontend
Interesting. I thought they just followed approach 2.
Granted I only got borderline hire recommendation from my Google interviews but pseudo-y code was fine for my sessions. They specifically told me it didn't need to run, just needed to properly describe the logic. Even if you get an interviewer that doesn't know JavaScript they should allow it by policy.
I think your knowledge of when and how to use those types of structures should be more important to an interviewer than actually implementing them, so I would imagine pseudocode would suffice for front end. But some interviewers can be dicks about it. Idk why you would ask someone to do something in JS that you wouldn’t ever actually do.
If you have to use a heap ask the interviewer if you can assume a heap implementation. If he/she says no. Write the code for a simple one... it’s what you would have to do on the job right? I feel like g won’t ask a heap question because they are too easy or too popular and thus banned. I would also consider alternative implementations that you believe requires treemap. Honestly completed hundreds of problems myself rarely did I need to use it.. See what other leetcoders submitted for top performing JavaScript solutions.
Don’t worry about it. Just switch to Java if you think JS doesn’t have the required data structure, e.g. PriorityQueue. Tbh, the chances of you getting a question where you have to use one of those data structures is less, but no interviewer would mind if you switch the language.
Thanks a lot folks for the insights. Really appreciate it.
Yeah I had a recent Google frontend interview and I could assume that a TreeNode class existed and use it.
Thank you CWE. Do you mind sharing info about what to expect in each of the rounds in Google FE interview?
I had five rounds which consisted of 2 algo/ds interviews, 2 frontend coding interviews, and 1 behavioral (googleyness) interview. Can’t share the exact questions due to NDA but the algo/ds interviews were Leetcode-type questions, one of which was LC hard. In the frontend coding interviews, I was asked to implement some widget using HTML/CSS/javascript that involved DOM interactions and other frontend concepts, and also asked to implement a javascript API. I would suggest study up on whatever you feel less confident about. If it is algo/ds, do more Leetcode. If it’s frontend development, practice implementing a small web app.
Why not commit to Java? This will make it less confusing for your interviewer
Since I am a frontend engineer and mostly work with Javascript. Even in backend I previously used NodeJS, which again is based on Javascript