---
title: "Discussion on \"Amazon - How Many X’s In a Range\" | Hashnode"
description: "Discussion on \"Amazon - How Many X’s In a Range\". Given two integers L, R, and digit X. Find the number of occurrences of X in all the numbers in the range (L, R) excluding L and R.\nExample 1:\nInput:\nL=10, R=19, X=1\nOutput:\n9\nExplanation:\nThere are 9 1s (11, 12, 13, 14, 15, 16, 17, 18) in the number..."
url: "https://hashnode.com/posts/amazon-how-many-xs-in-a-range/6571851ed21f8935942f3f0d"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Amazon - How Many X’s In a Range](https://sirishachallagiri.hashnode.dev/amazon-how-many-xs-in-a-range?utm_source=hashnode&utm_medium=feed)

Given two integers L, R, and digit X. Find the number of occurrences of X in all the numbers in the range (L, R) excluding L and R. Example 1: Input: L=10, R=19, X=1 Output: 9 Explanation: There are 9 1s (11, 12, 13, 14, 15, 16, 17, 18) in the number...

Dec 7, 2023 · 2 min read · sirishachallagiri.hashnode.dev  
Read the article

-   [#geeksforgeeks](https://hashnode.com/tag/geeksforgeeks)
-   [#java](https://hashnode.com/tag/java)
-   [#daily-coding-problem](https://hashnode.com/tag/daily-coding-problem)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)
-   [#coding](https://hashnode.com/tag/coding)

## Written by

[Sirisha Challagiri](https://hashnode.com/@Siri2316)

@Siri2316

  
[View profile](https://hashnode.com/@Siri2316)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
