TikTok | OA | Coding Round | 2022

Tiktok · Question · Posted Apr 2026

Given an integer sequence (a) of length N, you are to cut the sequence into several parts such that every one of which is a consecutive subsequence of the original sequence. Every part must satisfy this-the sum of the integers in the part is not greater than a given integer M. You are to find a cut that minimizes the sum of the maximum integer of each part.  

The full answer & interview discussion are available to premium members.

Log in Create a free account