Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 290 Bytes

File metadata and controls

20 lines (16 loc) · 290 Bytes

Digit Frequency

Easy


  1. You are given a number n.
  2. You are given a digit d.
  3. You are required to calculate the frequency of digit d in number n.

Example 1:

Input:  994543234  4
Output:  3

Constraints:

0 <= n <= 10^9
0 <= d <= 9