Compare High Score Counts
Updated
Problem statement
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) → intExamples
Example 1
countA = 12countB = 18return = -112 is smaller than 18.
Example 2
countA = 25countB = 25return = 0The two counts are equal.
Example 3
countA = 30countB = 7return = 130 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