3202. Find the Maximum Length of Valid Subsequence II | Weekly Leetcode 404

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

*************************************************

*************************************************
Timestamps -

00:00 - Agenda
00:39 - Problem Description
02:29 - Brute force solution
02:55 - One simple observation
06:45 - Brute force solution for Alternating numbers
09:30 - Optimising the solution
11:00 - Pseudo code & Time Complexity
18:38 - Code Walkthrough

*************************************************
Interview Experiences Playlists -

*********************************************************************

Please show support and subscribe if you find the content useful.
Рекомендации по теме
Комментарии
Автор

For each row of your time complexity analysis you are keeping V1i constant. But you are not considering the "cnt" part of your pseudo code wherein you will need to iterate over the bucket of each V1i and V2i pair.

tanishgotti
Автор

The analysis of time complexity part was brilliant !!!

quyhoaphantruong
Автор

Such a nice solution! I was kinda confused after seeing the dp solution

nabajyotimajumdar
Автор

Very intuitive solution. You have earned a subscriber!

biplavoraon
Автор

Thank you for the curated Segment Tree word document, will follow and practice from it.

simardeepsinghmudhar
Автор

Bro, what will be the dp approach for this?

josephaj
Автор

How do you even come up with these solutions ?

Rancha
Автор

one doubt ( a + b ) %k == (a%k + b%k)%k can you please explain why you're eliminating %k here

AnandKumar-kzls
welcome to shbcf.ru