FastPrepIPO
Problems/IPO

IPO

InMobi logoInMobi● HardFULLTIMEPHONE SCREEN

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in an InMobi phone screen. The report gives the IPO goal and the rule for updating capital. It does not give examples, a function interface, or limits on the numbers. Our version follows the well-known IPO task. It is about 94% the same as the reported question.

You are given n projects. Project i produces a pure profit of profits[i] and requires at least capital[i] current capital before it can be started.

You begin with capital w. After completing a project, immediately add its profit to your capital. Each project may be completed at most once.

Choose at most k distinct projects to maximize your final capital. Return that maximum final capital.

Function

findMaximizedCapital(k: int, w: int, profits: int[], capital: int[]) → int

Examples

Example 1

k = 2w = 0profits = [1,2,3]capital = [0,1,1]return = 4

Start project 0 to grow the capital from 0 to 1. Projects 1 and 2 then become affordable; choosing project 2 produces final capital 4.

Example 2

k = 3w = 0profits = [1,2,3]capital = [1,1,2]return = 0

No project is affordable with initial capital 0, so no project can be completed and the final capital remains 0.

Constraints

  • 1 <= profits.length = capital.length <= 10^5
  • 1 <= k <= profits.length
  • 0 <= w <= 10^9
  • 0 <= profits[i] <= 10^9
  • 0 <= capital[i] <= 10^9
  • The maximum final capital fits in a signed 32-bit integer.

More InMobi Phone Screen questions

  • House Robber IPHONE SCREEN · Seen Aug 2026
  • Word Break IIPHONE SCREEN · Seen Aug 2026
  • Bus Station Seat AllotmentPHONE SCREEN · Seen Mar 2026
  • Find Missing and Duplicate IntegerPHONE SCREEN · Seen Mar 2026
  • Frequency Equals Card ValuePHONE SCREEN · Seen Mar 2026
  • Frog Position After T SecondsPHONE SCREEN · Seen Mar 2026
  • Evaluate DivisionPHONE SCREEN · Seen Dec 2025
  • Compare Version NumbersPHONE SCREEN · Seen Feb 2022
  • Count Array DerangementsPHONE SCREEN · Seen Feb 2022
  • Maximum Frequency StackPHONE SCREEN · Seen Feb 2022

Similar questions at other companies

  • IPOTekion · PHONE SCREENTekion interview questions
  • Lexicographically Smallest Array with K-Limited Right MovesGoogle · PHONE SCREENGoogle interview questions
  • Minimum Refueling StopsBloomberg LP · PHONE SCREENBloomberg LP interview questions
  • Tennis Court SchedulingAtlassian · PHONE SCREEN · ONSITE INTERVIEWAtlassian interview questions
  • Maximum Number of Events That Can Be AttendedByteDance · PHONE SCREENByteDance interview questions
  • Maximum Number of Events That Can Be AttendedSnowflake · PHONE SCREENSnowflake interview questions
  • Schedule Unit-Time Jobs for the Most ProfitScale AI · PHONE SCREENScale AI interview questions
  • Minimum Meeting RoomsSentry · PHONE SCREENSentry interview questions
  • Minimum Refueling StopsUber · ONSITE INTERVIEWUber interview questions
  • Maximize Revenue from Decreasing InventoryChubb · OAChubb interview questions
All InMobi interview questionsSee InMobi hiring insights
Saved
class Solution {
    public int findMaximizedCapital(int k, int w, int[] profits, int[] capital) {
        // Write your code here
    }
}
Checking account…