PracHub
QuestionsPremiumLearningGuidesInterview PrepNEWCoaches
|Home/Coding & Algorithms/Adobe

Maximize pay by flipping k rest days

Last updated: Mar 29, 2026

Quick Overview

This question evaluates algorithm design and optimization skills in string processing and combinatorial decision-making, testing how to maximize weighted sequences of workdays under a limited number of flips.

  • Medium
  • Adobe
  • Coding & Algorithms
  • Software Engineer

Maximize pay by flipping k rest days

Company: Adobe

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: Medium

Interview Round: Technical Screen

Given integers BasePay and Bonus, a binary string schedule of length n where '1' means work and '0' means rest, and an integer k, you may change up to k zeros to ones. Pay rules: each workday earns BasePay; if day i and day i-1 are both workdays, you earn an additional Bonus for day i. Return the maximum total pay achievable after up to k flips. Describe your algorithm and analyze its time and space complexity.

Quick Answer: This question evaluates algorithm design and optimization skills in string processing and combinatorial decision-making, testing how to maximize weighted sequences of workdays under a limited number of flips.

Related Interview Questions

  • Traverse a path and print directory tree - Adobe (medium)
  • Build a React team builder with role constraints - Adobe (medium)
  • Implement K-means clustering from scratch - Adobe (medium)
  • Design a nested-list iterator - Adobe (Medium)
  • Determine task order with prerequisites - Adobe (Medium)
Adobe logo
Adobe
Sep 6, 2025, 12:00 AM
Software Engineer
Technical Screen
Coding & Algorithms
7
0

Given integers BasePay and Bonus, a binary string schedule of length n where '1' means work and '0' means rest, and an integer k, you may change up to k zeros to ones. Pay rules: each workday earns BasePay; if day i and day i-1 are both workdays, you earn an additional Bonus for day i. Return the maximum total pay achievable after up to k flips. Describe your algorithm and analyze its time and space complexity.

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More Coding & Algorithms•More Adobe•More Software Engineer•Adobe Software Engineer•Adobe Coding & Algorithms•Software Engineer Coding & Algorithms
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.