Challenging World's Most Selective University with Coding Question!

Challenging Stanford Students to code in 5 mins with a problem asked in IIT & MIT exams!!
Edited by Chaitanya khachane
📈 Get 2 FREE Stocks in US (valued up to $1400): a.webull.com/i/SinghinUSA
I use WeBull & RobinHood for stock trading which are legal.
My Study Abroad channel: / @harnoorsinghofficial
iPhone Vlogging Gear:-
📱iPhone 14:
amzn.to/3Mqn3AL(India)
amzn.to/3VkIKq9(US)
📸Sony Camera:
amzn.to/3EAjKFx
🎥360 Camera:
amzn.to/35QU0jg (India)
amzn.to/2MfDp1q (US)
Tripod:
amzn.to/3EAk1be
🎙Vlogging & Podcast Mic (I use different cable for iPhone & Camera):
amzn.to/2OzeeZ3 (India)
amzn.to/2Y02IJo (USA)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Follow me on -
Instagram - / iharnoor
Twitter - / iharnoorsingh
For Doubts Related to Undergrad: / 1234179803434320
Discord Server: / discord
E-mail for BUSINESS INQUIRY & HELP- hello@singhinusa.com
MUSIC CREDITS:
Music From (Free Trial): www.epidemicsound.com/referra...

Пікірлер: 254

  • @Swmdwn.Khakhlary
    @Swmdwn.Khakhlary Жыл бұрын

    honestly, I really enjoy such content harnoor, please continue doing such type of vids. I really appreciate your effort man

  • @shachisinghal8856
    @shachisinghal8856 Жыл бұрын

    Keep posting such videos. They are very inspiring.

  • @aanifshabir1554
    @aanifshabir1554 Жыл бұрын

    14:03 best part 😂

  • @goodhuman1
    @goodhuman1 Жыл бұрын

    All of these videos are so good, especially at Stanford and with the Meta guy!!

  • @atmangautham7078
    @atmangautham7078 Жыл бұрын

    I’m loving this series of asking questions to top College students❤

  • @tebooo_n
    @tebooo_n Жыл бұрын

    Please make more videos like this 🥹 really enjoy watching them. Very insightful

  • @hitman_zw590

    @hitman_zw590

    Жыл бұрын

    um with u

  • @starboy001
    @starboy001 Жыл бұрын

    The way SHE told that why she was able to solve the 'leetcode' questions, shows us the harsh reality of being poor. Kudos woman.👍🏿👍🏿

  • @theprofessor8844
    @theprofessor8844 Жыл бұрын

    Good to see people appreciating difficulty at IITs ....

  • @rohanIVY

    @rohanIVY

    Жыл бұрын

    Tho tu kyu khush ho raha

  • @abhijeetsingh4824

    @abhijeetsingh4824

    Жыл бұрын

    @@rohanIVY INKO IIT ME NAUKRI LAGA HAI. JANITOR KA

  • @akashpaul4143

    @akashpaul4143

    Жыл бұрын

    @@rohanIVY dikhai nahi deta woh professor hai !!🙂🥲

  • @theprofessor8844

    @theprofessor8844

    Жыл бұрын

    @@rohanIVY Because I was at one point involved in studying for these institutes. I understand how hard it is to get in.

  • @hippityhoppity3964

    @hippityhoppity3964

    Жыл бұрын

    @@akashpaul4143 Bhai phir toh muje kal paaka asli Willi smith ne comments meh gaali di

  • @AbhishekSingh0216
    @AbhishekSingh0216 Жыл бұрын

    Their names were Sanjay,Sahil & saurav and they were not from India🙃.even foreigners give Indians name to their children.

  • @sxmeersharma

    @sxmeersharma

    Жыл бұрын

    They are from Indian origin not Indian their parents are probably 2nd Gen Immigrants

  • @mrkiba1781

    @mrkiba1781

    Жыл бұрын

    @@sxmeersharma Sahil from Bangladesh

  • @sxmeersharma

    @sxmeersharma

    Жыл бұрын

    @@mrkiba1781 it’s a common name in both countries he could be even Pakistani

  • @arnavD007

    @arnavD007

    Жыл бұрын

    I guess they are OCI's

  • @mrkiba1781

    @mrkiba1781

    Жыл бұрын

    @@sxmeersharma he is my relative, don't claim anyone Indian origin

  • @joelmarkjmj
    @joelmarkjmj Жыл бұрын

    We want this type of content More and More and Most

  • @mrd6840
    @mrd6840 Жыл бұрын

    Hey bro I need more videos like mit students solving iit question paper and iit students as same as mit question paper. Need from you

  • @mohitchoudhary3668
    @mohitchoudhary3668 Жыл бұрын

    Honestly i enjoy the series It's great to know the foreign students how they study in college and what apporch they think 💬. And sir one request is there , can you make a video for Bca students . How they can start to do coding and after doing bca they should do masters for multinational companies . And for multinational companies only coding is important or any more thing we have to study. Because we are learning basic things of coding . And one more thing i am noob in coding so how can i start coding can you explain in video or reply here . And for coding you can prefer any book .

  • @noorarahiman8429

    @noorarahiman8429

    10 ай бұрын

    Same

  • @mohitmishra3091
    @mohitmishra3091 Жыл бұрын

    bhai indians hi indians dikh rahe sab jagh..hahah..its like u r in dilli sarijini nagar..so happy seeing indian roots at all places !!

  • @jaycen1856
    @jaycen1856 Жыл бұрын

    This is just a pure understanding of how binary operations work…. Nothing too technical on algorithm.

  • @raghavchhabra5951
    @raghavchhabra5951 Жыл бұрын

    Everytime I watch his video, I start doing leetcode for a week and then stop. 😂

  • @rohanIVY

    @rohanIVY

    Жыл бұрын

    Relatable😂

  • @boy0607boy

    @boy0607boy

    Жыл бұрын

    @@rohanIVYhow do you decide on the list of problems?

  • @redhair1401

    @redhair1401

    Жыл бұрын

    @@boy0607boy no. Of likes on the problem

  • @dokyungsoo8623

    @dokyungsoo8623

    Жыл бұрын

    Me tooo

  • @dark_techyy

    @dark_techyy

    5 ай бұрын

    Let me take your mock interview if you are still alive!😊😂

  • @Asherstitusworld
    @Asherstitusworld Жыл бұрын

    Super video Bro Nice Intro

  • @lokendrasingh841
    @lokendrasingh841 Жыл бұрын

    brother i want to know more about cs engineering so please can you give idea of a good plate-form for coding.

  • @yash9725
    @yash9725Ай бұрын

    # One of the better ways to find if the number is a power of 2:- #include using namespace std; bool f(int n) { if(n == 0) { return false; } int count = 0; while((n & 1) == 0) // when the lsb is set the loop stops. { count++; n >>= 1; } if(n == 1) { return true; } return false; } int main() { int n = 16; cout

  • @HungryWTF
    @HungryWTF Жыл бұрын

    bro that string question is cake walk level 😂

  • @Piggynmoo
    @Piggynmoo Жыл бұрын

    My son is doing CS from UTS in sydney and Its my dream to see him get his masters from MIT.

  • @mrd6840
    @mrd6840 Жыл бұрын

    I need this kind of videos more ...

  • @rahuliitbhu3111
    @rahuliitbhu3111 Жыл бұрын

    good job , keep it up.

  • @raghavgujjar
    @raghavgujjar Жыл бұрын

    The O(1) solution is limited by the address space of the registers in the CPU and ALU. So for very large powers of two, like above 2^64 it may not be as efficient. Depends on how many bits the registers can store. Disclaimer: This is just thought aloud. Might need more verification.

  • @ujjwaldhyani5063

    @ujjwaldhyani5063

    Жыл бұрын

    yeah but the input itself is stored in int/long format so this solution would work

  • @shukanyahazarika1789

    @shukanyahazarika1789

    Жыл бұрын

    int range 2^31-1

  • @forunsecurewebsite156
    @forunsecurewebsite156 Жыл бұрын

    Question: im bad at math but i want walk in technology path, should i learn math first or codding(Frontend) but i havent decide what i want to focus with is it website or the other.

  • @themanofgod8770

    @themanofgod8770

    Жыл бұрын

    I suggest sticking to your passion, if you love technology then pursue that, allow everything else to follow suit. I shall give you an example, a strategy game like Yu-Gi-Oh requires a lot of reading, however reading is not a necessity, if one has a passion in Yu-Gi-Oh, they simply need to play the game, memorising the cards they need to know, eventually memorising what words relate to what meaning, after decades of playing Yu-Gi-Oh, do you not think he would have grasped basic reading, enough to play Yu-Gi-Oh effectively? Analogous to you grasping maths, enough to be effective in the path of tech

  • @Rahul62635
    @Rahul62635 Жыл бұрын

    Stanford Universities not all students r as briliant as iitians As 40-50% goes to iit due to their social activities in international level

  • @MLRTrytonix13
    @MLRTrytonix13 Жыл бұрын

    For the second problem I'm actually surprised the first guy didn't have a clue of the most efficient way. I'm a CS Junior and one of my first class last semester was about assembly. It helped me so much with the understanding of problems like these.

  • @eduardocod8924

    @eduardocod8924

    Жыл бұрын

    Yeah but after 3 months you’ll forget it 😂

  • @vision_lc
    @vision_lc Жыл бұрын

    He never stop to motivate people 🥺

  • @muditkhanna8164
    @muditkhanna8164 Жыл бұрын

    the solution you just gave for was very creative for checking the power of the two , but after that the more simple answer would've been just checking the LSB of that binary number

  • @aritano491
    @aritano49110 ай бұрын

    For the power of 2 one you can just do log(number)/log(2) and if its an int then you know the number has a base of 2. However, I may have also misunderstood the question lol.

  • @sankalpvats4658
    @sankalpvats4658 Жыл бұрын

    Amazing content❣️❣️I also wanna be like you

  • @THE_GFI
    @THE_GFI Жыл бұрын

    This is good content bro but please post the selected question or any question to solve for the viewers ✌

  • @masudahmed5196
    @masudahmed5196 Жыл бұрын

    Wow awesome 👌 Appreciating for Last girl 👧

  • @pradyumnasharmakattel129
    @pradyumnasharmakattel129 Жыл бұрын

    harnoor? please tell me,, are you on your OPT right now or what? in what status are you there right now? you had got F1 again in dropbox from delhi,, so you are doing masters?

  • @udproductions5855
    @udproductions5855 Жыл бұрын

    Mai bba ka student hu pr Mai ek code developer bna cahta hu to kya Mai bn skta hu agr bnta hu to bhi kya mujhe achi job milegi jaise ki btech walo ko milte hai

  • @no-eh4sz
    @no-eh4sz Жыл бұрын

    MIT admissions process pa ek video banaow bahi

  • @indrashispowali
    @indrashispowali Жыл бұрын

    Maja e aa gaya vlog dekh ke toh

  • @furiousbro4685
    @furiousbro4685 Жыл бұрын

    This students are quite intellegent .

  • @neon-astronaut

    @neon-astronaut

    Жыл бұрын

    Bhai won Stanford hai Wahan to honge hi

  • @serenestrolls-d7b
    @serenestrolls-d7b Жыл бұрын

    For 2 to the power n, can’t we just take base 2 log of the number. If we get an integer back. Then it’s true else it’s false. That would also be constant time. Assuming log2 function has constant time.

  • @spiderop2125

    @spiderop2125

    Жыл бұрын

    Where can you get that log function from ? Not every lang is python.

  • @prabhattiwari007

    @prabhattiwari007

    Жыл бұрын

    @@spiderop2125 exactly...That is what I was thinking

  • @yunik_developer

    @yunik_developer

    Жыл бұрын

    Yeah it can be possible in Java and CPP both they have log functions

  • @manfromwuhan714

    @manfromwuhan714

    Жыл бұрын

    They’re basically asking them to code the log function from scratch. In the most efficient way possible

  • @shahbazkhalilli8593
    @shahbazkhalilli8593 Жыл бұрын

    please share the result such as valid answers of all questions at the end

  • @draviki
    @draviki Жыл бұрын

    i like your content Harnoor. Keep visiting the college

  • @shauryakansal1081
    @shauryakansal1081 Жыл бұрын

    thanks for everything!

  • @thankyou_guruji
    @thankyou_guruji Жыл бұрын

    Aryender is doing such an amazing job as Harnoor's new partner! Also giving away 100 or 50 USD to these students who can afford leetcode premium doesn't makes much sense! Why don't you give your Indian subscribers a question who can't afford leetcode premium?

  • @ahmadcheema8389
    @ahmadcheema8389 Жыл бұрын

    bhai jan. Full stack web developer kha be scope ha canada ma plz reply

  • @liontalha7383
    @liontalha7383 Жыл бұрын

    And me thinking the optimal solution for power of 2 => (ceil(log2(n)) == floor(log2(n)))

  • @swarupbehera6806
    @swarupbehera6806 Жыл бұрын

    x=int(input(enter the no;)) y=x/2 if y==x//2 : print("is a power of 2") maybe the second question cqn be solved like this

  • @Sanyu-Tumusiime

    @Sanyu-Tumusiime

    Жыл бұрын

    why bother doing that? just use bitwise to solve it public static void main(String[] args){ int x = [INPUT]; int ct = 0; while(x > 0){ if(x & 1 == 1){ ct ++; x >>= 1; } if(ct == 1) System.out.println("is a power of 2"); else System.otu.println("not a power of 2"); } very easy

  • @swarupbehera6806

    @swarupbehera6806

    Жыл бұрын

    @@Sanyu-Tumusiime that seems more hard though 😅😅🤣🤣

  • @v.varsha4633

    @v.varsha4633

    Жыл бұрын

    Hey yours will be wrong as for ex of we take 12 it will return 6 and 12//2 also returns 6 even though they are same we know that 12 is not a power of 2

  • @Sanyu-Tumusiime

    @Sanyu-Tumusiime

    Жыл бұрын

    @@v.varsha4633 you're right. it will be wrong. use my solution

  • @swarupbehera6806

    @swarupbehera6806

    Жыл бұрын

    @@v.varsha4633 you are absolutely correct ma'am and i agree as now I can see I am purely wrong there btw I started to learn programming 3 months ago so no hardships 😁 Let's see what this world has to offer for me 😌

  • @pritikahanda7709
    @pritikahanda7709 Жыл бұрын

    i learnt whole of this binary system in grade 10th and after joining coaching institute it all went to vein due to extreme pressure of examsss

  • @harshvardhannaik1959
    @harshvardhannaik1959 Жыл бұрын

    Bro my brain 🧠 is hanged after watching match . Any mathematic solution for this?

  • @jasdeepsinghgrover2470
    @jasdeepsinghgrover2470 Жыл бұрын

    BTW all these solutions are actually correct... The full adder circuit is itself O(number of bits) so subtracting 1 takes O(number of bits which is same as number of digits)

  • @ziedbrahmi4812

    @ziedbrahmi4812

    Жыл бұрын

    mm not really , it's more efficient because it's a native thing for the processor.

  • @jasdeepsinghgrover2470

    @jasdeepsinghgrover2470

    Жыл бұрын

    @@ziedbrahmi4812 but it is still under the assumption that number fits in the circuits

  • @kirtisahani3412
    @kirtisahani3412 Жыл бұрын

    I really enjoy it 😀😀🙃.

  • @thelegend5633
    @thelegend5633 Жыл бұрын

    Please make video on MIT VS STANFORD

  • @mugiwara_

    @mugiwara_

    Жыл бұрын

    just stupid idea bro

  • @diganta7
    @diganta710 ай бұрын

    Can I know which programming language are they using?

  • @rahbs26
    @rahbs26 Жыл бұрын

    GREAT HARNOOR BRO

  • @venkateshkumar9289
    @venkateshkumar9289 Жыл бұрын

    This would work right ? base_number = 2 power_of = int(input("Enter the power of number: ")) user_calculated_output = int(input("Enter the number to check if the required result is True/ False: ")) multiply_power = base_number ** power_of if multiply_power == user_calculated_output: print("True") else: print("False")

  • @rashmikadk6796
    @rashmikadk6796 Жыл бұрын

    Can you share the links of sources of these problems please 🙏

  • @pratikdharanep.d.8938
    @pratikdharanep.d.8938 Жыл бұрын

    BCA student here ❤️

  • @sanjaygatne1424
    @sanjaygatne1424 Жыл бұрын

    why not popcount(x)==1 to find pow of two.

  • @dakshbhatnagar
    @dakshbhatnagar Жыл бұрын

    I thought MIT < Stanford. Anyways bro you got to get a dedicated mic since the device is picking up sounds of the background as well

  • @mugiwara_

    @mugiwara_

    Жыл бұрын

    lmao why , MIT is #1

  • @ansh_rp
    @ansh_rp Жыл бұрын

    IIT--jalba h hamara 🤣

  • @Ayan-who
    @Ayan-who Жыл бұрын

    I have seen that purple t-shirt guy with glasses in one of your other video

  • @kislayanegi1742
    @kislayanegi1742 Жыл бұрын

    Ayender is genius!!!!

  • @ankitrawat-acodebreaker
    @ankitrawat-acodebreaker Жыл бұрын

    shouldnt N & (N-1) be O(log2N) and not O(1)

  • @shayanali7558
    @shayanali7558 Жыл бұрын

    I would have gone for; int a ; if (2 modulus a == 2) {cout

  • @goodguy128

    @goodguy128

    Жыл бұрын

    No...

  • @ankitclass10th62
    @ankitclass10th62 Жыл бұрын

    Is everyone knows about iit in stanford

  • @randym1788
    @randym1788 Жыл бұрын

    What is not clear in the question is if the result is to be in binary format or decimal. 1100 or 12?

  • @avocadorable18
    @avocadorable18 Жыл бұрын

    Video seems to be lagging. Anyways harnoor great content.

  • @bigtummy8533
    @bigtummy8533 Жыл бұрын

    Can you meet Manu Chauhan? You interviewed him?

  • @lostgoat
    @lostgoat Жыл бұрын

    8:00 return n & (n-1) == 0

  • @ANNGUYEN-cw7lw
    @ANNGUYEN-cw7lw Жыл бұрын

    You can visit mission college to contest code in 5 minutes

  • @yusuf_cars
    @yusuf_cars Жыл бұрын

    where can I get those IIT exams pdf am studying computer science.

  • @mugiwara_

    @mugiwara_

    Жыл бұрын

    from students at iit

  • @sahilnandal1643
    @sahilnandal1643 Жыл бұрын

    Can you also show the complete solution of questions???

  • @yash9725
    @yash9725Ай бұрын

    # Adding 2 Binary Strings:- #include using namespace std; string bin(string &s1,string &s2) { int i = s1.size() - 1; int j = s2.size() - 1; int carry = 0; string res = ""; while(i >= 0 || j >= 0 || carry) { int n1 = (i >= 0) ? s1[i] - '0' : 0; int n2 = (j >= 0) ? s2[j] - '0' : 0; int sum = n1 + n2 + carry; carry = sum / 2; res.insert(res.begin(),(sum % 2) + '0'); i--; j--; } return res; } int main() { string s1 = "101"; string s2 = "0010"; cout

  • @abhisheksingh402
    @abhisheksingh402 Жыл бұрын

    In my college out of 100 almost 99 can't solve these problems. Here almost every one have knowledge

  • @ankurrajbangshi7133
    @ankurrajbangshi7133 Жыл бұрын

    What is Lewis Hamilton doing in Stanford??🤔

  • @ankurpathak5964
    @ankurpathak5964 Жыл бұрын

    kuch samjah nehi aya but sunke achaa lagaa :)

  • @shubhanshukumarsingh6133
    @shubhanshukumarsingh6133 Жыл бұрын

    14:00 "IIT" be like Raula hai hamra , kabhi kabhi to lgta hai apun hicch bhagwan hai.

  • @mugiwara_

    @mugiwara_

    Жыл бұрын

    Still not in top 50 in global list where as MIT and Staford are in top 3

  • @user-pf7ch6ys9r
    @user-pf7ch6ys9r5 ай бұрын

    i am from pakistan i don`t no what an diffecult level(mean at logically level not craming ) iit take off the test but an incridble change in india education really appricated ....

  • @Lol-qy1dy
    @Lol-qy1dy Жыл бұрын

    Multiple of 2 question soo easy...

  • @jasminevora852
    @jasminevora852 Жыл бұрын

    Jalwa hai .

  • @prodabber0222
    @prodabber0222 Жыл бұрын

    imagine how selectvie stanford would be if it was in washington

  • @sunny---24
    @sunny---24 Жыл бұрын

    you go to USA and find Indians there

  • @tripcreator87
    @tripcreator87 Жыл бұрын

    Admission in IIT is much tougher than MIT, People like you who not able to clear JEE moved to US/UK for further degree course.

  • @ganeshmaharaj4075
    @ganeshmaharaj4075 Жыл бұрын

    Op!

  • @alphaleporis329
    @alphaleporis329 Жыл бұрын

    12:00 *That's why I'm at Stanford not MIT* As if Stanford is the LPU of USA.

  • @justenjoythejourney2377
    @justenjoythejourney2377 Жыл бұрын

    Wait! Harnoor actually Rick Rolled us! That's why I have trust issues...

  • @yahyaashraf5511
    @yahyaashraf5511 Жыл бұрын

    Please visit LAC too

  • @anantpandey4985
    @anantpandey4985 Жыл бұрын

    Bro go for campus tour also

  • @IMINTONIRVANA
    @IMINTONIRVANA Жыл бұрын

    Ivy league kids are literally out of this world

  • @rohanIVY

    @rohanIVY

    Жыл бұрын

    Facts

  • @arnavfx6466
    @arnavfx6466 Жыл бұрын

    Good vid

  • @anshul2000punk
    @anshul2000punk Жыл бұрын

    Man I just saw this video to make me realize how dumb I am.

  • @sandeep8203
    @sandeep8203 Жыл бұрын

    Bhai isse software kaise banta hai 😭😭😭

  • @shahbazkhalilli8593
    @shahbazkhalilli8593 Жыл бұрын

    x="101" y="111" list=[] def binary(num): for index in range(len(num)): list.append(index) list.reverse() return list def bin_cal(daxil): result=0 for index, eded in enumerate(daxil): eded=int(eded) result+=int(eded)*(2**binary(daxil)[index]) return result print(bin_cal(x))

  • @ShivamMishra-zm3hh
    @ShivamMishra-zm3hh Жыл бұрын

    Wedding begins 😃😃 next year

  • @abhishekshankar1136
    @abhishekshankar1136 Жыл бұрын

    the power of 2 soln is brian kernighan algorithm , just fyi

  • @paavnishukla
    @paavnishukla Жыл бұрын

    Harnoor rolling his Ts and Rs😅😅

  • @asisbhatrai5608
    @asisbhatrai5608 Жыл бұрын

    For checking if the number of 2 to the power of some number: def check(x): m = x/2 while m > 1: m = m/2 if m == 1: return True else: return False

  • @anshadebon5217
    @anshadebon5217 Жыл бұрын

    Dream University

  • @avinashgupta4038
    @avinashgupta4038 Жыл бұрын

    Lagta hai bhai ko bhi startup karne ka hai.

  • @First533
    @First533 Жыл бұрын

    Lots of Indian names like Sanjay , sahil etc love to see Indians doing great

  • @xPhilosophyy

    @xPhilosophyy

    Жыл бұрын

    Theyre from Indian parents so their descent is indian but their nationality is ig american so i don’t really think we should address them as indians

  • @First533

    @First533

    Жыл бұрын

    @@xPhilosophyy i know that they are American citizen

  • @stevenayare6097

    @stevenayare6097

    Жыл бұрын

    just because someone looks Indian with indian names, does not mean that person is actually an Indian

  • @parthankolikar5864
    @parthankolikar5864 Жыл бұрын

    bruh these questions are so easy

  • @devanshsolani2711
    @devanshsolani2711 Жыл бұрын

    No longer Meta Engineers😣😣