Available question text
Given an undirected graph with node scores, find the maximum sum of scores of any simple path of exactly four nodes (a–b–c–d with edges between adjacent nodes), or return -1 if no such path exists. Large constraints (n, m up to ~5·10^4) mean brute-force enumeration is too slow and you must prune/limit neighbor choices to compute the optimum efficiently.
Related questions
Continue with questions that share topics or the same question type.
- Find and Count Maximum-Score Grid Paths
Coding · Dynamic Programming · Grids & Matrices
- Find the Maximum Divisibility Score
Coding
- Find the Maximum Factor Score of Array
Coding
- Find the Maximum Sequence Value of Array
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 2242. Maximum Score of a Node Sequence
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source