Core cs: Dbms, os, oops, cn.. DSA: array: 2 pointers, sliding windows, prefix sum Hashing strings: diferent patterns bit manupulation Linked lists, trees, basic dp and graphs ...
Read the input number Take an integer num from the user. Convert the number to a non-negative value Use Math.abs(num) and store it in n to handle negative numbers. Check if the number is zero If n == ...
Start and read an integer n from the user. Initialize a variable count = 0. If n == 0, set count = 1 (since 0 has 1 digit). Otherwise, repeat while n ≠ 0: • Divide n by 10 • Increment count Display ...