Sqrt(x) | LeetCode 69 | Coding Interview Tutorial

preview_player
Показать описание
Sqrt(x) solution: LeetCode 69

AFFILIATE LINKS
If you're interested in learning algorithms, these are great resources.

💲 All coupons and discounts 💲

Sqrt(x) | LeetCode 69 | Coding Interview
#sqrt(x) #leetcode #algorithms #terriblewhiteboard #codinginterview

Click the time stamp to jump to different parts of the video.
00:00 Title
00:06 Problem readout
00:39 Whiteboard solution
05:51 Coding solution
11:52 Result and outro
Рекомендации по теме
Комментарии
Автор

If there are any videos you'd like me to make or if you have any ideas on how to optimize this solution, let me know!

TerribleWhiteboard
Автор

before finishing the video, I clicked like because I liked your explanation

MS-rwrh
Автор

Love you!! You explained it so clearly & simple, thanks a lot

snowie
Автор

such a good explanation. bro you are the best

sachinshilwal
Автор

THANK YOU FOR SPEAKING NON INDIAN ENGLISH! 🙏

alonshlider
Автор

Well explained!
Three suggestions:
- left = 2 (since we're already not going to consider 0 or 1)
- right = x / 2 (since the square root will never be greater than half of x)
- mid = Math.floor((left + right) / 2) (simpler equation)

heagandev
Автор

Played so many videos on the same problem, until I stopped here and understood finally. Awesome!!

arif
Автор

why don't we use mid as Math.floor((right+left)/2) just like the formula for finding average

willowsongbird
Автор

good video keep making more on leetocdes

callmechocolateboy
Автор

you're my go-to source for algos. I'm trying to go through your entire playlist of algos. So far you've taught me so much. Thanks a ton the quality vidoes and explanation!

MrZiyak
Автор

Why midpoint is not -> (left+right)/2

tejasmehta
Автор

you're the best. keep making these type of videos. thank you so much for taking the time in creating all this amazing content

Sportsarena
Автор

I think you should rebrand to "Terrific Whiteboard"

IRLVaporwave
Автор

One thing to do to avoid integer overflow for other languages, compare mid with mid / x like " mid < mid / x" or "mid > mid / x". Thanks for the explanation.

Joyddep
Автор

very simple explanation, hope you will upload more leetcode problems.

mohammednishad
Автор

Why not start the input array with N/3. We logically know that in N/2, the number near to the middle element of the array can never be the answer. Unless its 4 or -4.

AbhishekSrivastava_ab
Автор

Thanks for the video. The solution overflows for big int numbers, at least in C#. I worked around that by working with longs instead of ints and then casting the long to int before returning.

mauricioencina
Автор

This channel should be renamed to Amazing Whiteboard because this is one of the best algorithmic explanations i've seen lmao (even for such a simple question!). Really hope you can keep these videos coming :)

sunnilabeouf
Автор

I don't understand why after eliminating the numbers to the right, you still keep the midpoint but when eliminating numbers to the left, you get rid of it.. why the disparity

superoriginalname
Автор

Thanks for the easiest explanation, just for doubt why we don't use right = mid - 1 but we used left = mid + 1

piyusharmaus
welcome to shbcf.ru