FastPrepLast Digit of the Ways to Split Traders Between Two Offices
Problems/Last Digit of the Ways to Split Traders Between Two Offices

Last Digit of the Ways to Split Traders Between Two Offices

Akuna Capital logoAkuna Capital● EasyNEW GRADOA

Updated Dec 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: One report, posted in 2026 about an Akuna Capital online assessment for a full-time new-graduate position in the quant track, names two multiple-choice questions the author had not seen before; this problem is built on the second one.

From the report: 30 traders are placed in two offices, neither office may be empty, and the question asks which digit the count of possible splits ends in. The author gives the answer 2.

Our choices: the number of traders is an input from 2 to 10^9 instead of a fixed 30, and you return the digit instead of picking one of the offered choices, which the report does not list. The report does not say whether the traders and the offices can be told apart. We treat both as different, because that reading gives the reported answer 2; if the two offices could not be told apart, the digit would be 1. The reported case is Example 1; we chose the other examples and the limit.

Our version is about 90% the same as the reported question.

A firm hires traders new traders and places them in two offices, office A and office B. Every trader goes to exactly one of the two offices, and each office must get at least one trader.

The traders are different people, and the two offices are different places. Two splits count as different when at least one trader is in a different office. For example, with 3 traders, "trader 1 in office A, traders 2 and 3 in office B" and "trader 1 in office B, traders 2 and 3 in office A" are two different splits.

Return the last digit (from 0 to 9) of the number of possible splits.

Function

lastDigitOfSplits(traders: int) → int

Examples

Example 1

traders = 30return = 2

Sending trader 1 to office A and the other 29 traders to office B is one allowed split. Sending all 30 traders to office A is not allowed, because office B would get no trader. Counting every allowed split gives 1,073,741,822 ways, which ends in 2.

Example 2

traders = 3return = 6

Write a split as the offices of traders 1, 2 and 3 in order. The allowed splits are AAB, ABA, BAA, ABB, BAB and BBA. AAA and BBB are not allowed because one office would be empty. That is 6 ways, so the last digit is 6.

Example 3

traders = 5return = 0

Writing the offices of traders 1 to 5 in order, AABBB and BABAB are two of the allowed splits. AAAAA is not allowed, because office B would be empty. There are 30 allowed splits in all, and 30 ends in 0.

Constraints

  • 2 <= traders <= 10^9

More Akuna Capital Online Assessment questions

  • Light Bulbs Left On After All Engineers FinishOA · Seen Dec 2026
  • Delivery Management SystemOA · Seen Nov 2026
  • Count Server ReplacementsOA · Seen Nov 2026
  • Match Orders by Price and Arrival TimeOA · PHONE SCREEN · ONSITE INTERVIEW · Seen Nov 2026
  • Maximum Remaining Drone PowerOA · Seen Nov 2026
  • Rolling MetricsOA · Seen Oct 2026
  • Vowel Substring GameOA · Seen Sep 2026
  • Competitive ForagingOA · Seen Sep 2026
  • Binary CircuitOA · Seen Sep 2026
  • Items SortOA · Seen Sep 2026

Similar questions at other companies

  • Counting Cows by Their LegsSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • Summarize Taxi Drivers and RidesBoston Consulting Group · OABoston Consulting Group interview questions
  • Total Cost Against the Lowest Earlier PricePayPal · OAPayPal interview questions
  • Count Valid Square PairsAuxoAI · OA
  • Server InvestmentRippling · OARippling interview questions
  • Basic Item DiscountsPalantir · OAPalantir interview questions
  • Identification Number Check DigitAbridge · OAAbridge interview questions
  • Count Substrings With Identical CharactersVirtu Financial · OAVirtu Financial interview questions
  • Next Pascal Row CoefficientIntuit · OAIntuit interview questions
  • Digit-Sum Sequence Join PointOpenAI · OAOpenAI interview questions

Akuna Capital interview experiences

  • Akuna Capital Quant Trader and QR Interviews: 5 Experiences
  • Akuna Capital JQR CodePair Rounds: 8 Experiences (Part 6 of 6)
  • Akuna Capital QR Probability Phones: 14 Experiences (Part 5 of 6)
  • Akuna Capital QR-ML Interviews: 11 Experiences (Part 4 of 6)
  • Akuna Capital QR Regression Rounds: 11 Experiences (Part 3 of 6)
  • Akuna Capital QR Coding Interviews: 17 Experiences (Part 2 of 6)
All Akuna Capital interview questionsSee Akuna Capital hiring insights
Saved
class Solution {
    public int lastDigitOfSplits(int traders) {
        // Write your code here.
    }
}
Checking account…