FastPrepCompare High Score Counts
Problems/Compare High Score Counts

Compare High Score Counts

Vanguard logoVanguard● EasyFULLTIMEOA

Updated Oct 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: The report recalls High Scores only as comparing counts; the original score-generation rules and output were not shared. This minimal practice adaptation compares two supplied counts, with about 50% match to the reported core description.

Compare two supplied high-score counts, countA and countB.

For this exercise, assume the counts are already computed nonnegative integers. Return -1 if countA is smaller, 0 if they are equal, or 1 if countA is larger.

No game simulation, record tracking, or score aggregation is required.

Function

compareHighScoreCounts(countA: int, countB: int) → int

Examples

Example 1

countA = 12countB = 18return = -1

12 is smaller than 18.

Example 2

countA = 25countB = 25return = 0

The two counts are equal.

Example 3

countA = 30countB = 7return = 1

30 is larger than 7.

Constraints

  • For this exercise, assume 0 <= countA, countB <= 10^9.

More Vanguard Online Assessment questions

  • Two SumOA · Seen Sep 2026
  • Valid ParenthesesOA · Seen Sep 2026
  • Are They PangramsOA · Seen Nov 2025
  • Missing WordsOA · Seen Nov 2025
  • Spam DetectionOA · Seen Nov 2025
  • Binge WatchingOA · Seen Jan 2023
  • Minimum Moves Around a Circular ArrayOA · Seen Aug 2022
  • Maximum Occurring CharacterOA · Seen Mar 2022
  • Picking TicketsOA · Seen Mar 2022
  • Tool List: Two Smallest ValuesOA · Seen Nov 2021

Similar questions at other companies

  • Count Valid Square PairsAuxoAI · OA
  • Counting Cows by Their LegsSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions
  • 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
  • Minimum Testers to Find the Poisoned BottleWalleye Capital · OA
  • Address on Same PageNVIDIA · OANVIDIA interview questions

Interview reports that mention this question

  • Vanguard Tech and Risk Older OAs: 12 Experiences (Part 3 of 3)
  • Vanguard Software Older Rounds: 13 Experiences (Part 2 of 3)
  • Vanguard Tech Intern Interviews: 37 Experiences (Part 1 of 3)
All Vanguard interview questionsSee Vanguard hiring insights
Saved
class Solution {
    public int compareHighScoreCounts(int countA, int countB) {
        // Write your code here.
    }
}
Checking account…