Demystifying Hard Interview Question as an ex-Microsoft Developer | Data Structures and Algorithms

preview_player
Показать описание

Preparing for Coding Interviews?
Want to test your skills?

Watch the video where I demystify a Hard Coding Interview Question from scratch.
This question was very interesting as this tests -
(1) Problem Solving ability of the candidate
(2) Implementation correctness - it's a tricky code with good corner cases to watch out
(3) Time Complexity analysis - loved this one for this question

𝗜𝗡𝗧𝗘𝗥𝗩𝗜𝗘𝗪 𝗣𝗥𝗘𝗣 𝗣𝗥𝗢𝗗𝗨𝗖𝗧𝗦

SUBSCRIBE AND HIT BELL ICON TO CHECK MORE OF MY CONTENT

𝗦𝗢𝗖𝗜𝗔𝗟 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦

𝗜𝗠𝗣𝗢𝗥𝗧𝗔𝗡𝗧 𝗣𝗟𝗔𝗬𝗟𝗜𝗦𝗧𝗦

𝗣𝗥𝗢𝗚𝗥𝗔𝗠𝗠𝗜𝗡𝗚 𝗣𝗥𝗢𝗙𝗜𝗟𝗘𝗦
Рекомендации по теме
Комментарии
Автор

very nicely explained, i much prefer interviewers who focus on tradeoffs rather than perfect, bug-free code

NeetCode
Автор

I actually got it, I knew the height was log n, to use binary search, pre-sum and also to store it in a dictionary (I think in python). I'm so happy... :D. Doing Codejam & Kickstart really improves your way of thinking.

arunh
Автор

These guy actually explains how to apply different concepts and data structures to a coding problem. Tower research is lucky to have such talent.

anirudhsinhrajput
Автор

Constraints: On integer size
Python: I'm about to destroy this man's whole career

VivekYadav-dsoz
Автор

Hey Rachit, Nice explanation,
Am I right if I will say that the prefect time complexity is O(N * logM), where N = max value or array elements and M = size of the array

chandvachhani
Автор

I have one query, as the problem says we have to find subset with given sum, so if our array is like
2, 3, 4, 5, 8 and the sum we have to find is 6 then answer should be "YES" as there is a subset 2, 4 is available but with given algorithm I think we can't find 6 and we may return No. But if we are returning No then is it correct or not or should we return Yes ?
Please correct me.

ahishnar
Автор

I have implemented that using recursion in contest but through this video now I have learnt we can use queue for similar problems.

shrivipulbansal
Автор

Reading the title I thought it was a techlead video.😅

alkanedust
Автор

Really good and intuitive problem. Accepted in a GO! Thanks for an amazing explanation.

thecuriousprogrammer
Автор

What if the input array is [2, 2, 2, 2] and our query is 2? It looks like you will hit the condition a[l] == a[r] and you would never put 2 in your map?

JJ-vjeq
Автор

Hey Rachit, Thanks for this great video. Please make some videos for topics to covers other than dsa (like system design, os, networks etc) for tech interviews and how to prepare for them.

eeshandeo
Автор

Bhaiya ek discussion hmare Sumeet Malik sir ke saath kr ljiye, really He is doing great work .

sukanyasinha
Автор

Got the O(N log N) solution but I kept thinning for an O(n) solution because of the thumbnail :D

beingnikhil
Автор

What will the time complexity if we use recursion instead of iteration?

chaitanyagujarathi
Автор

Is this O(N) means O(number of Window)?

MahirHasancse
Автор

My total CGPA is 6 at IIT Roorkee
Can I sit for coding interview

guuffhihg
Автор

Hi Rachit . Thanks a lot for this video. Please share some video on System Design as well, resources and how to approach this kind of quuestions like HLD and LLD . It will be quite useful for the community.

ChandraShekhar-bycd
Автор

Hey Rachit I've A Question
I Like Both Development And DSA Noob In Devlopment And Beginner In DSA

My Question Is I Just Applied For a two month open source mentorship program like gsoc Not Like Leval Of Gsoc But Its Ok
I am doing android(noob just Started few weeks ago)

Should i hold on and prepare first or if may i get selected then i learn and Implement

What is the right path according to me Because i am complete Fresh Guy In This Is Software World


From tier 3 2nd Year

So According To These Things Should I Leave For Now And Prepare and do later Or Just Get My Hands Dirty

oyepuru
Автор

Rachit bhai plz ek baar hamara channel chek karke batai kaisa hai ❤️😍 plz

GadgetLifes