LEETCODE 977: MICROSOFT INTERVIEW QUESTION | SQUARES IN A SORTED ARRAY | C++

  Рет қаралды 2,535

Nikash Kumar

4 жыл бұрын

Hi Everyone,
It's one of the TOP #INTERVIEW QUESTION asked in #Facebook, #Google and Microsoft :)
This video contains 3 different ways of solving the problem. Do let me know if you guys have any questions/concerns.
Solve this problem here: leetcode.com/problems/squares-of-a-sorted-array/
Do Like, Share and Subscribe here: kzbin.info
Keep Learning Everyday
Thank you for watching :)

Пікірлер: 16
@sudharani7550
@sudharani7550 2 жыл бұрын
Great explanation of all the approaches !
@NikashKumar
@NikashKumar 2 жыл бұрын
Thank you sudha. Do like and share. 😊
@vivekbudge9706
@vivekbudge9706 4 жыл бұрын
Good solution.
@NikashKumar
@NikashKumar 4 жыл бұрын
Thank you Vivek
@tazzang0921
@tazzang0921 4 жыл бұрын
awesome!!
@NikashKumar
@NikashKumar 4 жыл бұрын
Thank u so much
@oshin33anika
@oshin33anika 2 жыл бұрын
For the 3rd solution, isn't res extra memory?
@utkpal
@utkpal Жыл бұрын
yeah same doubt
@sahildeshmukh6878
@sahildeshmukh6878 2 жыл бұрын
#include using namespace std; int main() { int n; cin >> n; int a[n]; for(int i=0; i> a[i]; } int index =1; for(int i=0; i
@sahildeshmukh6878
@sahildeshmukh6878 2 жыл бұрын
getting an error
@sahildeshmukh6878
@sahildeshmukh6878 2 жыл бұрын
Line 1034: Char 34: runtime error: applying non-zero offset 16 to null pointer (stl_vector.h) SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior /usr/bin/../lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/stl_vector.h:1043:34
@NikashKumar
@NikashKumar 2 жыл бұрын
@@sahildeshmukh6878 hey share your code and i can take a look.
@sahildeshmukh6878
@sahildeshmukh6878 2 жыл бұрын
@@NikashKumar i solved the errors in that code. Thanks for replying and making this video. could you please tell me the problem in following code.
@NikashKumar
@NikashKumar 2 жыл бұрын
@@sahildeshmukh6878 which code ?
@sahildeshmukh6878
@sahildeshmukh6878 2 жыл бұрын
@@NikashKumar i have attached the code many times, but after sometime, the reply is not visible.
Я сделала самое маленькое в мире мороженое!
00:43
Кушать Хочу
Рет қаралды 4,4 МЛН
规则,在门里生存,出来~死亡
00:33
落魄的王子
Рет қаралды 32 МЛН
Это было очень близко...
00:10
Аришнев
Рет қаралды 2,9 МЛН
Я сделала самое маленькое в мире мороженое!
00:43
Кушать Хочу
Рет қаралды 4,4 МЛН