Quick Overview

Positive integers whose digits are only 3, 5 or 6 are called good numbers; return the n-th good number in increasing order as a string for n up to one trillion. Tests counting by digit length and mapping the rank to a base-3 style digit sequence.

Find the N-th Positive Integer Whose Digits Are All 3, 5 or 6

Company: Waymo

Role: Software Engineer

Category: Coding & Algorithms

Difficulty: medium

Interview Round: Onsite

Overview: Positive integers whose digits are only 3, 5 or 6 are called good numbers; return the n-th good number in increasing order as a string for n up to one trillion. Tests counting by digit length and mapping the rank to a base-3 style digit sequence.

Loading…