3165. Maximum Sum of Subsequence With Non-adjacent Elements | Bonus Qs + Hint | Weekly Leetcode 399

Опубликовано: 28 Март 2026
на канале: codingMohan
2,358
90

Segment Tree Series - https://bit.ly/segment-trees

*************************************************
Contest Link - https://leetcode.com/contest/weekly-c...

Problem Link - https://leetcode.com/contest/weekly-c...
Solution - https://leetcode.com/problems/maximum...

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

00:00 - Agenda
01:30 - Problem Description
03:40 - [Brute force solution] Intuition
06:35 - [Brute force solution] Maximum subsequence sum
09:55 - [Brute force solution] Time Complexity
11:25 - Thought process to optimise
17:30 - [Merging Tree Nodes] Calculating "MAX_VAL"
25:29 - [Merging Tree Nodes] Calculating "SKIP_LAST"
31:53 - [Merging Tree Nodes] Calculating "SKIP_FIRST"
35:10 - [Merging Tree Nodes] Deriving "SKIP_LAST" with other values
39:05 - [Merging Tree Nodes] What variable we exactly need?
42:05 - [Merging Tree Nodes] Calculating "MAX_VAL" from final 2D array
43:55 - [Merging Tree Nodes] Recap of the Algorithm
45:32 - [Merging Tree Nodes] Pseudo code
48:31 - Final Algorithm
50:26 - Time Complexity
52:40 - Code Walkthrough
59:40 - Hint for Biweekly problem

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

Microsoft -    • Microsoft Interview Questions  
Amazon -    • Amazon Interview Questions  
D.E.Shaw -    • D.E.Shaw Interview Questions  
Linkedin -    • Linkedin Interview Questions  
Facebook -    • Facebook (Meta) Interview Questions  
*********************************************************************

Please show support and subscribe if you find the content useful.