Тёмный

Increasing Triplet Subsequence | Leetcode  

Techdose
Подписаться 177 тыс.
Просмотров 4,3 тыс.
50% 1

Опубликовано:

 

16 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 12   
@AshiqMohammed
@AshiqMohammed 3 месяца назад
The algorithm is wrong at 13:24 for [5,3,0,3,1,-1,2]. It fails the condition where i < j < k. When you update variable named as first in code using if condition with -1(from nums[5] in list which is j) , the variable named second holds value 1 (from nums[4] in list which is i). Therefore fails the condition i
@chilldldw-b7p
@chilldldw-b7p 2 месяца назад
True
@ringringlord
@ringringlord 5 месяцев назад
dry-run was exemplary. thank you
@techdose4u
@techdose4u 4 месяца назад
Welcome :)
@monikachauhan5931
@monikachauhan5931 4 месяца назад
Very good explanation 👏 keep it up
@joelsamuel9771
@joelsamuel9771 2 месяца назад
love the explanation!
@prashantbharti8314
@prashantbharti8314 5 месяцев назад
We can just use a stack and maintain increasing sequence in it. You explanation also follows the same logic but is difficult to understand in comparison to stack. Let me know if my proposal is incorrect and miss any test cases
@techdose4u
@techdose4u 4 месяца назад
Yes you can solve using stack too :)
@MukulBhave-ig4yx
@MukulBhave-ig4yx 5 месяцев назад
your explanations are super cool
@techdose4u
@techdose4u 4 месяца назад
Thanks :)
@abhivardhan395
@abhivardhan395 Месяц назад
Best 👌
@abhilashpatel6852
@abhilashpatel6852 4 месяца назад
nice explanation. no others could have explained to me like this. thanks!
Далее
Maximum Swap | 4 techniques | Leetcode 670
19:05
Fork and Exec in Linux
12:26
Просмотров 36 тыс.
Check If Array Pairs Are Divisible by k | Leetcode 1497
12:53
Maximum Width Ramp | Leetcode 962
32:34
Просмотров 1,6 тыс.
If Your Tech Job is Comfortable, You're in Danger
20:57
Dota2 Senate - Leetcode 649 - Python
14:48
Просмотров 22 тыс.
Design Circular Deque | Leetcode 641
15:14
Просмотров 1,6 тыс.