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 !!!
@ojuswi4 жыл бұрын
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_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
@codeitnative28494 жыл бұрын
No no no!.. it's great content so plz keep on bringing such questions. Thanks for the hard work.
@varun_jain_03674 жыл бұрын
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.mystiks99684 жыл бұрын
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.
@venkateshpillay47004 жыл бұрын
Hi, it's great to learn from you. Can you post questions related to combinatorics?
@LeoLeo-nx5gi4 жыл бұрын
+1
@sunshodan58834 жыл бұрын
+1
@sumitprasad61304 жыл бұрын
Beautiful problem, and beautiful solution, and again beautiful explanation.
@nanditasahu48174 жыл бұрын
Informative content ....with good and clear explanation..👍 Want more videos related to probability
@akanshapatil72924 жыл бұрын
The way to you explained the approach to solve the question was amazing It will be great if you make more such videos
@ashwaniponia38174 жыл бұрын
I was asked the same question in Microsoft interview it was really difficult for a beginner to come up with such a solution
@SauravKumar-kj1uu4 жыл бұрын
Yes plz make more such video
@aditiray43324 жыл бұрын
Great video. Please share more such probability related videos
@umeshtiwari92492 жыл бұрын
really nice explanation.
@vineetakhaitan42074 жыл бұрын
Amazing!!! Do make such videos on maths !!
@manjunathmali53104 жыл бұрын
Mind blown 🔥🔥🔥🔥
@rajeetgoyal68794 жыл бұрын
Thank you for your efforts in including animative explanations. It helps a lot. Please continue adding them in future videos👍👍
@onkarsawant62914 жыл бұрын
Please make such videos Thanks
@035_shubhamsaurav54 жыл бұрын
Great. More maths questions would be great..
@tirthjayswal98954 жыл бұрын
Really Good Explanation
@preetgandhi12334 жыл бұрын
Good video, Maths is something which is missed by normal programmers. it would be great if u have series of Maths questions.
@tusshar20004 жыл бұрын
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.
@mukteshmishra72934 жыл бұрын
Use VSCode or Sublime.
@WittyGeek4 жыл бұрын
Damn Rachit!! It was an awesome problem to solve. Nice one. Crisp and clear explanation.
@akshatojha77914 жыл бұрын
It was great, please come up with more such videos.
@manishdoley99094 жыл бұрын
need more content on probability and statistics
@ankitdedhia84604 жыл бұрын
More More More!!! Just don't stop Rachit!!! You're the best!!!!
@shushantgaur94204 жыл бұрын
More videos on math please💥💥💥
@anna15943 жыл бұрын
Thank you sir!
@user-mi8ew2to8e4 жыл бұрын
This question is out of bounds for me
@tarunsankhla23284 жыл бұрын
Dammn really liked it
@prateekvarshney22804 жыл бұрын
@rachit jain do companies take second year students for internship
@abhaypatil20004 жыл бұрын
Demnnnn. That was cool
@prabhas24454 жыл бұрын
Plz make a video on ml it will be very interesting
@vaidhyanathansm76254 жыл бұрын
Excellent Video! Thanks Rachit!!!
@baba-somanath4 жыл бұрын
Brilliant explanation. Please put more Mathematical problems.
@ayushsharma-music4 жыл бұрын
Sir can you make please how to download and configure vs code for cpp and use it
@skullcode88564 жыл бұрын
great man!!!
@rishabhmaheshwari77884 жыл бұрын
Thanks Rachit
@jontystanley4 жыл бұрын
Rachit Bhaiya, you are awesome.
@princeakhil2084 жыл бұрын
Thanks for your effort rachit 🤗
@jaibajpai83284 жыл бұрын
Yes please make some videos on math problems....and if possible then some questions on graohs
@akashkumarsingh19564 жыл бұрын
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!
@anubhavsarkar444 жыл бұрын
if you find a solution let me know couldnt come up with something under O N^2
@veenaarchana4 жыл бұрын
Probability of 4 ending up in 3rd pos is 1/n if only all the elements are unique?
@chandratejabavandla4 жыл бұрын
Awesome explanation. Thanks. Just a small suggestion, plz use a better mic 🙂
@prabhas24454 жыл бұрын
I thought you code your own program for random numbers with out importing random
@AbhishekAnandDas4 жыл бұрын
Please upload the video of live stream.I can't watch it right now.
@harshitmalhotra86274 жыл бұрын
It will be uploaded.
@Sanchitgoel104 жыл бұрын
Proof is black magic
@AyushJain-ti5yu4 жыл бұрын
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..
@asifkhan53594 жыл бұрын
Very informative video
@kazisahariarrahi25194 жыл бұрын
wow we will get to learn some more things
@surajnallam69534 жыл бұрын
Can anyone tell us what is the pprint( ) function unlike a print( )?
@RachitJain4 жыл бұрын
Just a pretty print. In this case takes care of printing things in multiple lines as opposed to a single line.
@surajnallam69534 жыл бұрын
@@RachitJain Thank you!
@asutoshmahapatro59034 жыл бұрын
You are awesome .... You are my source of inspiration 😊😊 .. And keep going on....
@AmolSharma994 жыл бұрын
I think the technique is very similar to reservoir sampling.
@rohitgurjar35254 жыл бұрын
Want more questions please
@saiootejreddy87014 жыл бұрын
Yes
@deepankargolait51214 жыл бұрын
great problem
@shankarsuman88014 жыл бұрын
Are you hinting at normal distribution for this question?
@ash_engineering4 жыл бұрын
Uniform distribution
@sanketdhole76254 жыл бұрын
There will be better understanding of question if shows with some example.
@laraibzemamaansari83794 жыл бұрын
want more math content sir
@aishwarysaxena53014 жыл бұрын
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
@normalperson11304 жыл бұрын
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.
@BarkaDog4 жыл бұрын
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.
@RachitJain4 жыл бұрын
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.
@aishwarysaxena53014 жыл бұрын
@@RachitJain tnks brother
@aishwarysaxena53014 жыл бұрын
@@BarkaDog even I applied for the job role as django developer they asked me dynamic programming questions ☹️
@syedabdul3434 жыл бұрын
Rachit bro can we do competitive programming with python or we have to switch to C++ compulsory..?
@bmanicharanreddy73864 жыл бұрын
he made a video about it
@syedabdul3434 жыл бұрын
@@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 ..?
@mayankgupta25434 жыл бұрын
Kool
@abhishekraj12894 жыл бұрын
👍🏼
@gouravm49864 жыл бұрын
Rachit sir using python and not c++ .. You are flawless in both languages while I'm still struggling withe the STL's 😅
@RachitJain4 жыл бұрын
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.
@gdthegreat4 жыл бұрын
@@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.