InterviewDB
Question
Winning Tiles: Determine the Victor in a Tile-Claiming Game
phone
Question Details
Problem Two players take turns claiming tiles from a 1D array of integer-valued tiles. Each turn, the current player must take from either the left end or the right end. Both play optimally to maximize their own score. Return the score difference (player 1 score minus player 2 score) at the end of the game. Follow-ups Define the recurrence dp[i][j] = best score difference achievable by the current player on subarray [i..j]. What is the time and space complexity of the DP solution? If tiles can h…
Full Details
🔒
Unlock all Ziphq questions
Full insider details, leaked discussions, and candidate experiences.
Get full access — $100 a year, unlimited accessAbout This Question
This is a reported interview question from a ziphq interview during the phone round.
It covers the following topics: Dynamic Programming, Phone, Coding, Arrays, Onsite .
Topics
More Ziphq Interview Questions
InterviewDB
Catch Me If You Can: Optimal Pursuer Movement on a Grid
InterviewDB
Conditional Check: Evaluate Boolean Expressions with Variables
InterviewDB
Ziphq SWE Phone - Convert Email
InterviewDB
Display Strings: Format and Wrap Text to Fit a Fixed-Width Screen
InterviewDB
Furthest Distance Reachable with Limited Fuel Stops