Facebook Interview Question | Maths & Probability Based Coding Interview Problem

  Рет қаралды 15,935

Rachit Jain

Rachit Jain

Күн бұрын

Пікірлер: 86
@chandurivarshith9916
@chandurivarshith9916 4 жыл бұрын
awesome interpretation...it might be sort of easy if we know the method and asked to prove that the probability for each number is 1/n but without knowing the approach thinking of any solution is insanely tough...and the way you solved it is just awesome beautiful !!!
@ojuswi
@ojuswi 4 жыл бұрын
Also, we may do something like... for i in range(n): a = randint( 0, n-1 ); b = randint( 0, n-1 ); arr[a], arr[b] = arr[b], arr[a] It's tougher to prove, but more readable and understandable.
@dragon_warrior_
@dragon_warrior_ 4 жыл бұрын
Still that implementation won't be as uniform as the one discussed...Cause a and b can be same number and in worst case for half of the iteration we only pick the the first half array and randomly interchange them so no uniformity
@codeitnative2849
@codeitnative2849 4 жыл бұрын
No no no!.. it's great content so plz keep on bringing such questions. Thanks for the hard work.
@varun_jain_0367
@varun_jain_0367 4 жыл бұрын
We need probability based Question, these questions are real pain in ass. First of all after encountering them, brain stops and first feeling comes is to skip them. These questions has ability to change the mind of the Interviewer. Moreover, your approach of any question is very simple and had lot of dirty approaches and hacks and we really connect to it. So please make more of it.
@mr.mystiks9968
@mr.mystiks9968 4 жыл бұрын
I think both solutions are fairly obvious. Shuffle1 is definitely the first solution most people will come up with. Shuffle2 we realize that Shuffle1 is moving values that have already been shuffled, which invalidates the shuffle.
@venkateshpillay4700
@venkateshpillay4700 4 жыл бұрын
Hi, it's great to learn from you. Can you post questions related to combinatorics?
@LeoLeo-nx5gi
@LeoLeo-nx5gi 4 жыл бұрын
+1
@sunshodan5883
@sunshodan5883 4 жыл бұрын
+1
@sumitprasad6130
@sumitprasad6130 4 жыл бұрын
Beautiful problem, and beautiful solution, and again beautiful explanation.
@nanditasahu4817
@nanditasahu4817 4 жыл бұрын
Informative content ....with good and clear explanation..👍 Want more videos related to probability
@akanshapatil7292
@akanshapatil7292 4 жыл бұрын
The way to you explained the approach to solve the question was amazing It will be great if you make more such videos
@ashwaniponia3817
@ashwaniponia3817 4 жыл бұрын
I was asked the same question in Microsoft interview it was really difficult for a beginner to come up with such a solution
@SauravKumar-kj1uu
@SauravKumar-kj1uu 4 жыл бұрын
Yes plz make more such video
@aditiray4332
@aditiray4332 4 жыл бұрын
Great video. Please share more such probability related videos
@umeshtiwari9249
@umeshtiwari9249 2 жыл бұрын
really nice explanation.
@vineetakhaitan4207
@vineetakhaitan4207 4 жыл бұрын
Amazing!!! Do make such videos on maths !!
@manjunathmali5310
@manjunathmali5310 4 жыл бұрын
Mind blown 🔥🔥🔥🔥
@rajeetgoyal6879
@rajeetgoyal6879 4 жыл бұрын
Thank you for your efforts in including animative explanations. It helps a lot. Please continue adding them in future videos👍👍
@onkarsawant6291
@onkarsawant6291 4 жыл бұрын
Please make such videos Thanks
@035_shubhamsaurav5
@035_shubhamsaurav5 4 жыл бұрын
Great. More maths questions would be great..
@tirthjayswal9895
@tirthjayswal9895 4 жыл бұрын
Really Good Explanation
@preetgandhi1233
@preetgandhi1233 4 жыл бұрын
Good video, Maths is something which is missed by normal programmers. it would be great if u have series of Maths questions.
@tusshar2000
@tusshar2000 4 жыл бұрын
What is this environment setup, please I want to know, if you have previously have made a video can anyone share the link for the same.
@mukteshmishra7293
@mukteshmishra7293 4 жыл бұрын
Use VSCode or Sublime.
@WittyGeek
@WittyGeek 4 жыл бұрын
Damn Rachit!! It was an awesome problem to solve. Nice one. Crisp and clear explanation.
@akshatojha7791
@akshatojha7791 4 жыл бұрын
It was great, please come up with more such videos.
@manishdoley9909
@manishdoley9909 4 жыл бұрын
need more content on probability and statistics
@ankitdedhia8460
@ankitdedhia8460 4 жыл бұрын
More More More!!! Just don't stop Rachit!!! You're the best!!!!
@shushantgaur9420
@shushantgaur9420 4 жыл бұрын
More videos on math please💥💥💥
@anna1594
@anna1594 3 жыл бұрын
Thank you sir!
@user-mi8ew2to8e
@user-mi8ew2to8e 4 жыл бұрын
This question is out of bounds for me
@tarunsankhla2328
@tarunsankhla2328 4 жыл бұрын
Dammn really liked it
@prateekvarshney2280
@prateekvarshney2280 4 жыл бұрын
@rachit jain do companies take second year students for internship
@abhaypatil2000
@abhaypatil2000 4 жыл бұрын
Demnnnn. That was cool
@prabhas2445
@prabhas2445 4 жыл бұрын
Plz make a video on ml it will be very interesting
@vaidhyanathansm7625
@vaidhyanathansm7625 4 жыл бұрын
Excellent Video! Thanks Rachit!!!
@baba-somanath
@baba-somanath 4 жыл бұрын
Brilliant explanation. Please put more Mathematical problems.
@ayushsharma-music
@ayushsharma-music 4 жыл бұрын
Sir can you make please how to download and configure vs code for cpp and use it
@skullcode8856
@skullcode8856 4 жыл бұрын
great man!!!
@rishabhmaheshwari7788
@rishabhmaheshwari7788 4 жыл бұрын
Thanks Rachit
@jontystanley
@jontystanley 4 жыл бұрын
Rachit Bhaiya, you are awesome.
@princeakhil208
@princeakhil208 4 жыл бұрын
Thanks for your effort rachit 🤗
@jaibajpai8328
@jaibajpai8328 4 жыл бұрын
Yes please make some videos on math problems....and if possible then some questions on graohs
@akashkumarsingh1956
@akashkumarsingh1956 4 жыл бұрын
Yesterday, in CodeVita Zone 2, there was a question of finding for a given range, the number of such permutations of K numbers, such that their sum, is even. Please try and help solve it in Java. I have serious issues with permutation programming questions. Please help!
@anubhavsarkar44
@anubhavsarkar44 4 жыл бұрын
if you find a solution let me know couldnt come up with something under O N^2
@veenaarchana
@veenaarchana 4 жыл бұрын
Probability of 4 ending up in 3rd pos is 1/n if only all the elements are unique?
@chandratejabavandla
@chandratejabavandla 4 жыл бұрын
Awesome explanation. Thanks. Just a small suggestion, plz use a better mic 🙂
@prabhas2445
@prabhas2445 4 жыл бұрын
I thought you code your own program for random numbers with out importing random
@AbhishekAnandDas
@AbhishekAnandDas 4 жыл бұрын
Please upload the video of live stream.I can't watch it right now.
@harshitmalhotra8627
@harshitmalhotra8627 4 жыл бұрын
It will be uploaded.
@Sanchitgoel10
@Sanchitgoel10 4 жыл бұрын
Proof is black magic
@AyushJain-ti5yu
@AyushJain-ti5yu 4 жыл бұрын
Hi, can u suggest me, should I switch to .net(c#, mvc ,core) as I'm currently working in BI based project and to be frank I don't like that technology... Also, in the past I have learnt .net, c# So I have the idea about that thing So, can u suggest is it a better option to choose a career in .net and I saw ur portfolio and u are familiar with .net technology too..
@asifkhan5359
@asifkhan5359 4 жыл бұрын
Very informative video
@kazisahariarrahi2519
@kazisahariarrahi2519 4 жыл бұрын
wow we will get to learn some more things
@surajnallam6953
@surajnallam6953 4 жыл бұрын
Can anyone tell us what is the pprint( ) function unlike a print( )?
@RachitJain
@RachitJain 4 жыл бұрын
Just a pretty print. In this case takes care of printing things in multiple lines as opposed to a single line.
@surajnallam6953
@surajnallam6953 4 жыл бұрын
@@RachitJain Thank you!
@asutoshmahapatro5903
@asutoshmahapatro5903 4 жыл бұрын
You are awesome .... You are my source of inspiration 😊😊 .. And keep going on....
@AmolSharma99
@AmolSharma99 4 жыл бұрын
I think the technique is very similar to reservoir sampling.
@rohitgurjar3525
@rohitgurjar3525 4 жыл бұрын
Want more questions please
@saiootejreddy8701
@saiootejreddy8701 4 жыл бұрын
Yes
@deepankargolait5121
@deepankargolait5121 4 жыл бұрын
great problem
@shankarsuman8801
@shankarsuman8801 4 жыл бұрын
Are you hinting at normal distribution for this question?
@ash_engineering
@ash_engineering 4 жыл бұрын
Uniform distribution
@sanketdhole7625
@sanketdhole7625 4 жыл бұрын
There will be better understanding of question if shows with some example.
@laraibzemamaansari8379
@laraibzemamaansari8379 4 жыл бұрын
want more math content sir
@aishwarysaxena5301
@aishwarysaxena5301 4 жыл бұрын
What do I do I want to make carrier in web development and in interview they keep asking questions of dynamic programming I mean is there any company who can understand what I want to do I just hate competitive programming I love development part not this and they ask coding questions
@normalperson1130
@normalperson1130 4 жыл бұрын
I think you can start by creating your own products. Ship them. create a brand and start freelancing. Being a consultant is much better. It would be difficult at first but you'd be your own boss. You've to sell yourself and deliver the projects.. Once you get a good experience you can probably apply to companies at a much higher level than freshers and your experience will speak about itself. Probably you can open your own consulting gig and hire other devs.
@BarkaDog
@BarkaDog 4 жыл бұрын
You can do freelancing or do a startup. Companies will judge you on the basis of your knowledge of ds algo. There's no way around that.
@RachitJain
@RachitJain 4 жыл бұрын
I hear you. My advice would be to build a strong GitHub profile and contribute in open source. This will help you in both - freelancing aspect as well as getting a job. You can speak for your skills by the projects showcased on GitHub. At the same time, it will help you stay transparent about how good you really are and keep you on track - working hard to build a good profile.
@aishwarysaxena5301
@aishwarysaxena5301 4 жыл бұрын
@@RachitJain tnks brother
@aishwarysaxena5301
@aishwarysaxena5301 4 жыл бұрын
@@BarkaDog even I applied for the job role as django developer they asked me dynamic programming questions ☹️
@syedabdul343
@syedabdul343 4 жыл бұрын
Rachit bro can we do competitive programming with python or we have to switch to C++ compulsory..?
@bmanicharanreddy7386
@bmanicharanreddy7386 4 жыл бұрын
he made a video about it
@syedabdul343
@syedabdul343 4 жыл бұрын
@@shitij7190 bhai Maine python free code camp se sekha hai..par jab GFG Mai questions solving karna try Kiya toh puure hava Nikal gaye..Kuch tips do bhai kaise algorithms and data structures sekhe ..?
@mayankgupta2543
@mayankgupta2543 4 жыл бұрын
Kool
@abhishekraj1289
@abhishekraj1289 4 жыл бұрын
👍🏼
@gouravm4986
@gouravm4986 4 жыл бұрын
Rachit sir using python and not c++ .. You are flawless in both languages while I'm still struggling withe the STL's 😅
@RachitJain
@RachitJain 4 жыл бұрын
The key is practise. I got familiar with C++ due to solving probably 500+ problems on Competitive Programming websites. Got fluent in Python while creating backend apis or creating scripts to do some extraction for me or to do some automation. Once you start using a language consistently, you will get better at it.
@gdthegreat
@gdthegreat 4 жыл бұрын
@@RachitJain Agreed and will surely follow same as had similar doubt in my mind same as of @gourav. Though I am not struggling with STL but using java for practicing DSA and using python at job.
@gouravm4986
@gouravm4986 4 жыл бұрын
@@RachitJain yess sir totally.
@parikshitrathore1510
@parikshitrathore1510 4 жыл бұрын
Explanation was not that gud yaar
@suvidsinghal1365
@suvidsinghal1365 4 жыл бұрын
Binod
Google Interview Question || Free  Giveaway worth 7500 INR
18:12
Rachit Jain
Рет қаралды 14 М.
Cheerleader Transformation That Left Everyone Speechless! #shorts
00:27
Fabiosa Best Lifehacks
Рет қаралды 14 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 2,7 МЛН
Support each other🤝
00:31
ISSEI / いっせい
Рет қаралды 59 МЛН
What Everyone gets WRONG about Career Development
6:47
Firm Learning
Рет қаралды 1,2 М.
Recursion + Stacks == Mind Blown 🔥| Coding Interview Question
9:31
How to: Work at Google - Example Coding/Engineering Interview
24:02
Life at Google
Рет қаралды 7 МЛН
Amazon Coding Interview Question - Recursive Staircase Problem
20:01
The Traveling Salesman Problem: When Good Enough Beats Perfect
30:27
How to STUDY so FAST it feels like CHEATING
8:03
The Angry Explainer
Рет қаралды 2,2 МЛН
Google Coding Interview with an ex-Microsoft Software Engineer
24:04