FastPrepCount Multiples of Three with Two Sevens
Problems/Count Multiples of Three with Two Sevens

Count Multiples of Three with Two Sevens

Hudson River Trading logoHudson River Trading● EasyNEW GRADOA

Updated Nov 2026

QuestionFunctionExamplesConstraints

Problem statement

Source note: Reported in a Hudson River Trading new grad online assessment. The report does not give limits on the numbers or the function signature. Our version is about 95% the same as the reported question.

You are given an integer array numbers.

Count how many values satisfy both of these conditions:

  • The value is divisible by 3.
  • Its ordinary base-10 representation contains the digit 7 at least twice.

Return that count.

Function

countDoubleSevenMultiples(numbers: int[]) → int

Examples

Example 1

numbers = [77,177,707,777,27,3]return = 2

177 and 777 are divisible by 3 and contain at least two sevens. The other values fail one or both conditions.

Example 2

numbers = [7,72,717,1770,7770]return = 3

The qualifying values are 717, 1770, and 7770.

Example 3

numbers = [111,222,333]return = 0

Every value is divisible by 3, but none contains the digit 7.

Constraints

  • 1 <= numbers.length <= 10^5.
  • 1 <= numbers[i] <= 10^9.

More Hudson River Trading Online Assessment questions

  • Count Palindrome Addition ChoicesOA · Seen Nov 2026
  • Recursively Expanded Shell Command CountsOA · Seen Oct 2026
  • Rotate Matrix Regions Around the DiagonalsOA · Seen Oct 2026
  • Maximum Diamond SumOA · Seen Oct 2026
  • Smallest Most-Lit Street PositionOA · Seen Oct 2026
  • Rearrange String by Alternating EndsOA · Seen Sep 2026
  • Most Items Within Budget from a Start IndexOA · Seen Sep 2026
  • Count Fancy NumbersOA · Seen Sep 2026
  • Count Pieces After Othello MovesOA · Seen Sep 2026
  • Merge Row Trees by Key PathOA · Seen Sep 2026

Similar questions at other companies

  • Closest ColorTwo Sigma · OATwo Sigma interview questions
  • Price Deviation AlertsJane Street · OAJane Street interview questions
  • Maximum Equal Parts for PrefixesAmazon · OA
  • Most Cost-Effective MachineCapital One · ONSITE INTERVIEWCapital One interview questions
  • Add Signed Character ArraysByteDance · PHONE SCREENByteDance interview questions
  • Eight-Direction Keyboard Typing TimeBenchling · PHONE SCREENBenchling interview questions
  • Total Cost Against the Lowest Earlier PricePayPal · OAPayPal interview questions
  • Count User Mentions in Chat MessagesRamp · OARamp interview questions
  • Count Valid Square PairsAuxoAI · OA
  • Picked Player Who LostSusquehanna International Group (SIG) · OASusquehanna International Group (SIG) interview questions

Hudson River Trading interview experiences

  • Hudson River Trading Quant Video Interview: 1 Experience
  • HRT SWE Intern and Onsites: 34 Experiences (Part 2 of 2)
  • HRT Python Track Interviews: 64 Experiences (Part 1 of 2)
  • HRT New Grad Python Track Interviews: 9 Experiences
All Hudson River Trading interview questionsSee Hudson River Trading hiring insights
Saved
class Solution {
    public int countDoubleSevenMultiples(int[] numbers) {
        // Write your code here.
    }
}
Checking account…