Finding Number of Digits in a Number
Problem:
Given an integer, find the number of digits in it.
Example:
Input: 1234Output: 4Input: -789435Output: 6
Approach 1) Iterative
Every time we divide a number by 10, the number of digits reduces by 1. So, we can count it until the number become...
learn-dsa.hashnode.dev1 min read