Lecture 7: LeetCode Problem Solving Session

preview_player
Показать описание
In this Video, we are going to solve LeetCode Problems:

There is a lot to learn, Keep in mind “ Mnn boot karega k chor yrr apne se nahi yoga ya maza nahi para, Just ask 1 question “ Why I started ? “

Homework: Added in Video already

Telegram Group Link: Love Babbar CODE HELP

Do provide you feedback in the comments, we are going to make it best collectively.

Connect with me here:

Intro Sequence: We have bought all the required Licenses of the Audio, Video & Animation used.

Timestamps:

00:00 - Introduction
00:37 - Reverse Integer
02:25 - Promotion
08:30 - Reverse Integer
17:31 - Complement Base10 Integer
32:20 - Power of Two

#DSABusted #LoveBabbar
Рекомендации по теме
Комментарии
Автор

When this man says, "samajh mein aa geya?, Chalo phirse samajhte hain", it gives a different kind of satisfaction ❤

himadridas
Автор

Thank you bhaiya, don't know if you are even reading this comment or not, but just wanna say, the process you are teaching for solving quetions is waayyy more important and efficient than any course or youtube video I have watched.
I definitely believe, this series is going to be a game changer.

zaeemAtif
Автор

Bhaiya seriously you are doing a lot of work for the community. I'll also contribute a lot like you in future and thanks thanks a lot!!!

visheshkaran
Автор

I have done the power of 2 question using bit and right shift it was much easier instead. First question till now in this series which built my confidence as I was able to think out of the box. Thanks.

ankitdaidanka
Автор

In the last question of power of 2, U can also use bit & n-1 ==0) then it is a power of 2..

rahulkumarsingh
Автор

Loved it bhaiya . We need more videos of leetcode questions discussion. I am a beginner in leetcode. By seeing your video i got the insight of how to approach a problem in leetcode. you are doing a great work..🙌

shivu
Автор

You explain that range part of problem in such easy words 🔥🔥

khushijain
Автор

Marked my attendance. loving the content.

anuradhajadon
Автор

Day 4 after starting first video, I'm fan of your teaching. thanks alot for this course.
Right now I'm preparing for relevel DSA and I'm quite confident now at the end i can give my 100% learning in test

vikashchoudhary
Автор

MOST NEEDED VIDEO BROTHER❤️,
WITHOUT DOING ACTUAL CODING, ONE CANNOT LEARN MUCH FROM IT :)

shubhamuniyal
Автор

ENJOYED!!!
Being Honest, Quite fast, but the way he revises everything after submitting, it helps a lot and if you still don't get the concept, watch it repeatedly 2-3 times, you''ll get it.
Completed on 10-11-2022 (21:22 pm).

RajatAswani
Автор

Loving The Content🔥🔥
Babbar Bhaiya Is Getting Blessed Of Students Wishesh😍

aashishrangdal
Автор

BOHOT zyada mazzaaa aa rha hai bhaiya, sab samajh aa rha hai...Aap plz time pe khatam kar dena iss course ko 🙏 Amazon crack karna hai ab to kisi bhi haalat me!!

RohitKumar-oolo
Автор

easier way to do complement of base 10 integer:- (let n = 5);
int num = 0;
int i = 0;

while (n!=0) {
int bit, rev;
bit = n & 1; // finding each bit of 5 i.e. 101
rev = bit ^ 1; // taking xor of each bit with one, which turns it into complementary (1xor1=0. & 0xor 1 = 1)
n = n>>1;
if (rev == 1) {
num = pow(2, i)*rev + num;
}
i = i + 1;
}

return num;

the xor operator turns 101(binary of 5) to 010(complement).
and the num gives us output = 2;

debjitghorai
Автор

POWER OF TWO

I have used binary digits to find solution, in binary number system
1 = 01
2 =10
4 = 100
8 = 1000
16 = 10000
My approach is I have converted n into binary string and checked if 1 appear excatly once

public boolean isPowerOfTwo(int n) {
int count = 0;

if(n == 1)
return true;
if(n < 0)
return false;

String bin = Integer.toBinaryString(n);
// int h = Integer.parseInt(bin);

for(int i=0 ;i< bin.length();i++)
{
if(bin.charAt(i) == '1')
count++;
}


if(count == 1)
return true;
else
return false;
}
}``

AMIT-bfid
Автор

One of the best thing is that you know how students make mistakes. Before seeing your solution, all the tried methods by me was also shown by you, and it feels good when someone understand where students make mistakes. Great work, you not only teaches us what is the right path but also how to think, what is it the intuition. Aur aapke suggestions are too great, leetcode ka discussion is phodu.

mlkgpta
Автор

this is my code for last question . bahut jayad simple simple socha😅😅
class Solution {
public:
bool isPowerOfTwo(int n) {
bool istrue = true;

if(n==1){
return true;
}
if(n<=0){
return false;
}
while(n!=1){
if(n%2==0){
n=n/2;
}
else{
istrue= false;
break;
}
}
if(istrue==true){
return true;
}else{
return false;
}

}
};

revantsinha
Автор

Bhut maja aaya bhaiya
Content badiya he bhut
Aap esse hi questions example or homework me dye na
Or khi bhi koi bhi Kami nhi thi
Full out full focus tha aapkye lecture me
Or lykin 1gante ki bajaye muje 2h+30m lag gye
Or Aaj phali bar leetcode per question fod kar kafi maja aaya
Me ab se phale se or aagye future me abhi aapse yu hi judi rhungi bhaiya
Thanks bhaiya etana badiya content hame free me sikhne kye liye .
Fee kye rup me God ji se kafi sari badiya badiya wishes aapkye liye magu gi .
Or muje bhi aapki hi trh ak badi company me interview fodna he .
Jariya (way of path ) muje mil hi gya aapse padh kare .
Bas ab entjar ak bar me hi select hokar dikhana he Microsoft kye interview me.
Interview me select hone kye bade aati hu bhaiya aapse milne . Placement achi Kashi rhi thi aapkye liye apple 🍎 ka ipade bhi laugi .mari trf se gift samje kar rhkh lye ne aap vaise bhi aapko koi gift nhi dye ta (aapne ak video me bola tha esliye muje yade tha )esliye me dugi aapko sabse acha vala gift .
Thank you bhaiya.
Miltye he aapse bhut jald 😃😃😃👋

Scientest
Автор

Thank you so much bhaiya, at first when I started DSA, I thought that it is not for me, but now I am starting to have confidence in myself thanks to you.

ansarisufiyan
Автор

Bhaiya, I am from Bangladesh. I am in first year of my varsity and really I always enjoy your content. Your contents are so much helpful for me. I am following your guidelines and practising hard and soul to get internships as well as placements in future. Keep me in your prayers.

md.muhaiminulislam