FastPrepTallest Billboard
Problems/Tallest Billboard

Tallest Billboard

Amazon logoAmazon● HardINTERNONSITE INTERVIEW

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an Amazon intern onsite interview. The task is fully given. We chose a simple function signature and the usual rule that some rods can go unused. Our version is about 99% the same as the reported question.

Partition any subset of rods into two groups with equal sums. Return the greatest possible common sum. A rod may be unused.

Function

tallestBillboard(rods: int[]) → int

Examples

Example 1

rods = [1,2,3,6]return = 6

Use 6 on one side and 1+2+3 on the other.

Example 2

rods = [1,2]return = 0

No positive equal-height partition exists.

Constraints

  • 1 <= rods.length <= 20.
  • 1 <= rods[i] <= 1000.
  • The total length is at most 5000.

Source note: Author-written prompt excerpt retained for source fidelity.

More Amazon Onsite Interview questions

  • Next Greater Element IONSITE INTERVIEW · Seen Dec 2026
  • LRU Cache for Query ResultsPHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Merge IntervalsOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Optimal Account BalancingONSITE INTERVIEW · Seen Dec 2026
  • Task SchedulerOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Dec 2026
  • Course SchedulePHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Flood FillONSITE INTERVIEW · Seen Nov 2026
  • Merge k Sorted ListsPHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Assign Escalations to TeamsONSITE INTERVIEW · Seen Nov 2026
  • Best Time to Buy and Sell StockONSITE INTERVIEW · Seen Nov 2026

Similar questions at other companies

  • Word Break IIBloomberg LP · PHONE SCREEN · ONSITE INTERVIEWBloomberg LP interview questions
  • Maximum Subarray Sum with Equal EndpointsGoogle · ONSITE INTERVIEWGoogle interview questions
  • Word BreakMoveworks · ONSITE INTERVIEWMoveworks interview questions
  • Longest Arithmetic SubsequenceC3.ai · ONSITE INTERVIEWC3.ai interview questions
  • Optimize Discount Selection Under a Point BudgetPalantir · OAPalantir interview questions
  • Count Ordered Combination Sums with Negative ValuesPinterest · PHONE SCREENPinterest interview questions
  • Frog JumpZillow · PHONE SCREENZillow interview questions
  • Maximum Escape Game ScoreMicrosoft · OAMicrosoft interview questions
  • Maximum Points by Deleting ElementsIBM · OAIBM interview questions
  • Maximum Points by Deleting ElementsWalmart · OAWalmart interview questions

Amazon interview experiences

  • Amazon Experienced SDE Onsite Questions: 1 Experience
  • Amazon SDE Onsite Interview Questions: 9 Experiences
  • Amazon SDE II and L5 FDE Interview Questions: 4 Experiences
  • Amazon Full-Time OA Problems, Earlier Reports (Part 5 of 5)
  • Amazon Full-Time OA Problems, Recent Reports (Part 4 of 5)
  • Amazon New Grad OA Problems: Every Task We Have (Part 3 of 5)
See Amazon hiring insights
Saved
class Solution {
    public int tallestBillboard(int[] rods) {
        // Write your code here.
    }
}
Checking account…