← Barclays questions
CodingReported in a candidate post, Jul 2025

Count occurrences of the digit 3 from 1 to n

Filed under Barclays

Given a number n, count how many times the digit 3 appears when every number from 1 to n is written out. For n = 14 the answer is 2 (from 3 and 13).

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Barclays questions

Collected from public candidate posts and coding forums. Updated Nov 2026.