How I make HARD coding problems look EASY

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

1. How to crack coding interviews?
2. How to prepare for coding interviews?
3. How to learn Data Structures and Algorithms?
4. How to use Leetcode effectively?
5. How to ace Software Engineer interviews?

I will answer all these questions in this video.

► Useful links:

► Follow us on Linkedin:

#codinginterview #datastructures #datastructuresandalgorithms #leetcode #dsa

DISCLAIMER: All opinions shared on this channel are our own and don't express views or opinions of our employers. We only use our experiences and public knowledge to make our content. NO CONFIDENTIAL INFORMATION of our employers is used or shared on this channel. This is not a Professional Coaching channel, it only highlights the public resources that have worked for our careers.
Комментарии
Автор

The thing about finding new patterns when you hit a wall is so true. I used to have trouble solving certain problems and then I found out about dictionaries and tuples. I was able to solve so many more after it. Need to find more patterns again. Thank you!

VijayKumar-dnpz
Автор

To people like me :

Let the cost of the ball be "B" in dollars. According to the information given, the bat costs $1 more than the ball, so the cost of the bat would be "B + $1."

Now, we know that together, the bat and the ball cost $1.10. So, we can set up an equation:

B + (B + $1) = $1.10

Combining like terms:

2B + $1 = $1.10

Subtract $1 from both sides of the equation:

2B = $0.10

Now, divide by 2:

B = $0.10 / 2 = $0.05

So, the cost of the ball is $0.05 or 5 cents.

ravitejajinka
Автор

to be able to spot the patterns you need to be exposed to a large dataset, which means you have to solve enough problems to gain that knowledge. And that is far from enough because if you do it slightly differently than the optimized solution there will be tons of edge cases to be considered.

haha-egfj
Автор

Let's say the cost of the ball is x.

Since the bat costs $1 more than the ball, the cost of the bat is x + $1.

The total cost of the bat and the ball together is $1.10, so we can set up the equation:

x + (x + $1) = $1.10

Combine like terms:

2x + $1 = $1.10

Subtract $1 from both sides:

2x = $0.10

Divide both sides by 2:

x = $0.05

So the ball costs $0.05, or 5 cents!

toluajise
Автор

I think my brain is thinking super slow, I couldn't even understand the bat and ball thing 🤣

Holfter
Автор

Nice explanation. It's true we need to use both fast and slow brain.

ashwinalagundi
Автор

thanks for your insight figured out where i was wrong

josephif
Автор

Please Sahil can you make a video on how to solve recursive problems. I'm finding it hard to understand recursive algorithm. 🙏

unyimeudoh
Автор

Took me a while to understand.
a = bat, b = ball
Statement 1 : a + b = 1.10
statement 2 : a = b + 1

a + b = 1.10
(b + 1) + b = 1.10
2b + 1 = 1.10
2b = 1.10 - 1
2b = 0.10
b = 0.10 / 2
b = 0.5

ShinAkuma
Автор

Hey love from India, i really loved how you explained tha backtracking problem. I have never gone through an explaination like this before. If there is any book to understand problems like this, please refer ❤

AbhishekThakur-bwco
Автор

Your content is soo aaawsome!!👌🏻... Trust me your videos not only gives me a good solution to my issues as a developer but also gives me motivation boost ❤️

abdulmalikYT_BGMI
Автор

Hello sahil, Thanks for sharing this video. I believe this will help so many coders. Coding is not about memorizing it's all about building intuition and practice.

Infinitycoder
Автор

Combination of fast brain and slow brain
Thanks so much for this

jatinnandwani
Автор

Can someone solve this for me?

In the army of Andromeda, the soldiers are segregated by rank. Each soldier except the first has a superior officer. The codes for the nuke are given to 2 soldiers for security purposes, and each would relay the information to their superior officer (this keeps on happening till it reaches the top most officer). The first officer who gets the information from two of his subordinates would detonate the nuke. Given m such queries find the officer who would detonate the nuke for each of them


Input Format

First line has an integer n, m, for the number of soldiers and number of queries. Second line has n−1 integers p2, p3, p4 … pn where pi is the superior officer of officer i. Next m lines have 2 integers a and b, such that the codes are given to soldiers a and b.

Constraints

1<=n<=10^5 1<=m<=10^5 1<=pi<=n

Output Format

M integers - the officer who detonates the nuke for each of the m queries.

Sample Input 0

4 2
1 2 2
2 3
1 2

Sample Output 0

2
1

markchoorakat
Автор

took me some thinking between both fast and slow brain to get to a bat costing $1.05 and a ball costing $0.05. When solving things with the fast brain, sometimes it takes one on a journey with their slow brain to make sure they got it right only to find oneself doubting self and repeat checking with the slow brain; only to confuse oneself! At least, that's what I experience when I try to do things my fast brain does with the slow brain!

duncancamilleri
Автор

Hey can you give us a info about software testing and it's survival ratio in future. Thanks

nirajbhuvad
Автор

Hard problems also involves applying some trick which is not always obvious.Average students can not think of them immediately. Can you please tell us how to think of such tricky problems.

shwetaj
Автор

I just want people to understand, that to some people things WILL come more naturally than it will to others.
And for a lot of people, no amount of hardwork will make you as good as the people to who it comes naturally.
The faster you understand that and stop guilt tripping yourself, the better it will be for you and for your health.
It doesn't make you worthless, it's just that you'll be useful in different roles than those people. And you can still do you part, but there might be somebody who'll be able to do the things you do faster, and in a way that you may never conceive. And you cannot learn that.
The fast you realise that, the better it will be for you. Anybody that tells you that hardwork will make you as good as the person that it comes naturally to, is lying to you
The only person you should compare yourself to is you. You can become better than you were.
You can even be more productive than the genius.
You can even produce better work than the genius, but you're not gonna be able to train yourself to become better at coming up with things that comes naturally to them.

jesseinfinite
Автор

*Moral of the Story* : Practice, Practice, Practice. Look for patterns in the way, and memorize those and apply them next time.

vasujhawar.
Автор

After watching this Video Who wants to learn DSA from Saahil 🙋🙋‍♀️?

NooraSpeaks