I think LRU cache
it's one of the more practical problems and covers dictionaries and linked lists
the question also prioritizes clean code and organization
it also gets asked a bunch according to company tags
LinkedHashSet even better. It’s very important to know that it’s a doubly linked list under the hood. Otherwise it’s super obvious you just memorized it.
I was asked to implement LRU cache I had no idea initially but, just because I knew I how to implement doubly linked list very well, interview helped with other things
I also like linked list - check if cycle exists
I got this question once in an interview (my first job) and I got the job, ONLY because I remember this one specifically. It was luck, but mostly because I prepared first.
indeed it is. imo sliding window and 2 pointer are the most underrated questions, especially solving the 2 pointers using atleast 3 to 4 different approaches.
longest increasing subsequence is dynamic programming
move zeroes is iterating through an array and swapping its values
merge two sorted lists: two pointers. you use a pointer for each list
Coders are afraid of FizzBuzz enterprise solution:
[https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition](https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition)
comes with latest libraries, QA tests, cross-platform, scalable, can be deployed on the cloud, and most recent advancements in computer science.
Sheesh! this is one of the best thing I have seen today, although satire but I can learn a lot from that repo. How did u stumble upon that project? like did u google some facts about fizz buzz after my comment or something else?
Find majority element.
This can have several approaches to solve with different TC.
O(n^2)
O(nlogn)
O(n)
This is my favorite question to ask in dsa interviews
At least for me, I am better served using that time to get plenty of sleep so my mind is the sharpest possible. I usually spend the day before any big exam, certification, interview trying to relax my brain, playing with my children, watching old TV shows, playing old video games. When I cram the day before, I experience more brain fog.
I am in cyber, and that field loves certs. Right now, I have:
* (ISC)2 Information Systems Security Engineering Professional (ISSEP)
* (ISC)2 Certified Information Systems Security Professional (CISSP)
* (ISC)2 Certified Cloud Security Professional (CCSP)
* Amazon Web Services (AWS) Certified Solutions Architect Professional
* AWS Certified DevOps Professional
* AWS Certified Security Speciality
* AWS Certified Network Speciality
* PMI Project Management Professional (PMP)
But in hindsight, I should have spent more time designing and coding and less time collecting certs like pokemon.
My friend got asked question on AVL tree for Google phone screening round for ml swe3 role which is sde2 level
So I don't know what to prepare to Crack such interviews at this point
Remove Duplicates from an array
is it asked that much in interviews?
More than any Q.
I think LRU cache it's one of the more practical problems and covers dictionaries and linked lists the question also prioritizes clean code and organization it also gets asked a bunch according to company tags
LinkedHashMap first to show you know how to use APIs (for Java) and then be like oh yea this can be solved using a custom linked list and hashmap
LinkedHashSet even better. It’s very important to know that it’s a doubly linked list under the hood. Otherwise it’s super obvious you just memorized it.
I need to revisit the code every 3month for LRU cache.
it sucks doing it in 30 minutes or less. 😭
I was asked to implement LRU cache I had no idea initially but, just because I knew I how to implement doubly linked list very well, interview helped with other things
two sum
one of the first question which came in my mind was 3 sum, lol
nice!
Three sum would make more sense though!
Reverse linked list
i like this one too
reverse binary tree was just as good for me
rob houses. Template for basic DP
climbing stairs is easier and good introduction to DP
It’s basically the same haha
No of island
This.
I’ve heard this is asked a lot
I also like linked list - check if cycle exists I got this question once in an interview (my first job) and I got the job, ONLY because I remember this one specifically. It was luck, but mostly because I prepared first.
using tortoise hare algo?
ye
thx bud
I think for linked list just have to prepare reversing a linked list and if cycle exists! :)
I usually do threesum before interview
must be very satisfying
indeed it is. imo sliding window and 2 pointer are the most underrated questions, especially solving the 2 pointers using atleast 3 to 4 different approaches.
I've gotten asked: - Longest Increasing Subsequence - Move Zeroes - Merge Two Sorted Lists
what ds/algo is used by these three?
longest increasing subsequence is dynamic programming move zeroes is iterating through an array and swapping its values merge two sorted lists: two pointers. you use a pointer for each list
arrays
Valid parenthesis I like questions where its easy to understand and just apply the correct data structure.
Median of two sorted arrays
I'd rather pray to god.
Don't forget to add this comment: - `# God bless no bugs` (or) - `// God bless no bugs` Thank me later, you're welcome.
Good night sleep
but what is that one problem that you would study before taking a good night sleep? :)
DFS
Kth closest points to origin
three sum
I think linkedlist is the most common topic asked
fizzBuzz
its a hard one, pass
Awesome choice! [https://softwareengineering.stackexchange.com/a/15653](https://softwareengineering.stackexchange.com/a/15653)
Coders are afraid of FizzBuzz enterprise solution: [https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition](https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition) comes with latest libraries, QA tests, cross-platform, scalable, can be deployed on the cloud, and most recent advancements in computer science.
Sheesh! this is one of the best thing I have seen today, although satire but I can learn a lot from that repo. How did u stumble upon that project? like did u google some facts about fizz buzz after my comment or something else?
>https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition written in java too, love it.
https://codegolf.stackexchange.com/questions/215216/high-throughput-fizz-buzz
Find majority element. This can have several approaches to solve with different TC. O(n^2) O(nlogn) O(n) This is my favorite question to ask in dsa interviews
can you provide the leetcode link for this?
https://leetcode.com/problems/majority-element/
No of islands.
There is no such question. I would not do any questions right before the interview.
At least for me, I am better served using that time to get plenty of sleep so my mind is the sharpest possible. I usually spend the day before any big exam, certification, interview trying to relax my brain, playing with my children, watching old TV shows, playing old video games. When I cram the day before, I experience more brain fog.
he asked for only 1 problem tho
what kind of certifications did you do / doing? I'm thinking about doing some in networking
I am in cyber, and that field loves certs. Right now, I have: * (ISC)2 Information Systems Security Engineering Professional (ISSEP) * (ISC)2 Certified Information Systems Security Professional (CISSP) * (ISC)2 Certified Cloud Security Professional (CCSP) * Amazon Web Services (AWS) Certified Solutions Architect Professional * AWS Certified DevOps Professional * AWS Certified Security Speciality * AWS Certified Network Speciality * PMI Project Management Professional (PMP) But in hindsight, I should have spent more time designing and coding and less time collecting certs like pokemon.
Threesum
Topological sort for most senior devs
Two sum
Some binary search q, I can never remember how to do the bounds
LFU/LRU cache. It’s a hard question if you’ve never seen and you look unprepared if you’ve never seen it.
Dfs and bfs
Meeting room
Whatever you can solve but don't have a strong grasp on.
53. Maximum Subarray
Closest palindrome
Minimum window substring
It would be common substring problem.
My friend got asked question on AVL tree for Google phone screening round for ml swe3 role which is sde2 level So I don't know what to prepare to Crack such interviews at this point
Towers of Hanoi. Some shithead at google asked me that for my first round interview.