Random Point in Non-overlapping Rectangles | LeetCode 497 | C++, Python

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

**** Best Books For Data Structures & Algorithms for Interviews:**********
*****************************************************************************

August LeetCoding Challenge | Problem 22 | Random Point in Non-overlapping Rectangles | 22 August,
Facebook Coding Interview question,
google coding interview question,
leetcode,
Random Point in Non-overlapping Rectangles,
Random Point in Non-overlapping Rectangles c++,
Random Point in Non-overlapping Rectangles Java,
Random Point in Non-overlapping Rectangles python,
Random Point in Non-overlapping Rectangles solution,
497. Random Point in Non-overlapping Rectangles,

#CodingInterview #LeetCode #AugustCodingChallenge #Google #Amazon
Рекомендации по теме
Комментарии
Автор

This did a great job. I was scared for this question but this is a step by step explanation just the last part needs a little more concentration. Thank you

DEVYANSHBATRA-em
Автор

Leetcode does a shit job in explaining this. I spent 30 mins understanding the question itself. Your video helped alot

nands
Автор

How about we randomly select the index of the rectangle first, then just return a point with x being a random number between its x1 and x2 and y being a random number between its y1 and y2

WKogut
Автор

Can't we do in this way..
First select random rectangle from n rectangles and after selecting a rectangle we generate random X coordinate between X1 and X2 and random Y coordinate between Y1 and Y2 and return [X, Y]...I am able to pass 32/35 cases....
But I am not understanding the mistake in this approach...

shaziasamreen
welcome to shbcf.ru