pratik-choudhari / AlgoCode

Welcome everyone!🌟 Here you can solve problems, build scrappers and much more💻
https://github.com/pratik-choudhari/AlgoCode
MIT License
131 stars 166 forks source link

Added the code to count single digits #285

Closed vaishnavirshah closed 4 years ago

vaishnavirshah commented 4 years ago

Description

A comprehensive description about the Pull Request

This is the code to count the single digits. Firstly the number is separated into digits by the modulo operation by 10 and then division by 10. A counter array is maintained to store the frequency of digits from 0-9. And the function returns the number of digits which have the frequency as 1 i.e. the number of digits which are not repeated and present only once. This is done by checking the counter values for the digits.

Reference Issue number #273

issue_no must refer to the issue related to this PR, visit here