Your Dashboard
Interview Coaching
Learn
System Design
ML System Design
Code
Behavioral
Salary Negotiation
Interview Guides
Search
⌘K
Get Premium
Leetcode 741. Cherry Pickup
Given an n×n grid with cherries (1), empty cells (0) and thorns (-1), find the maximum cherries collectible by going from (0,0) to (n-1,n-1) moving only right/down and then returning moving only left/up, where cherries are picked once and thorns block traversal. The core challenge is handling the round-trip overlap—typically modeled as two simultaneous forward paths (or DP over step and two positions) to maximize cherries without double-counting and while avoiding blocked cells.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.