Recursive Digit Sum (Super Digit ) in Java | Hacker Rank Interview Preparation | Solved in 3 Ways

preview_player
Показать описание
This video is about Step by step explanation of Recursive Digit Sum problem on Hacker Rank.

We define super digit of an integer using the following rules:

Given an integer, we need to find the super digit of the integer.

If has only digit, then its super digit is .
Otherwise, the super digit of is equal to the super digit of the sum of the digits of .
For example, the super digit of will be calculated as:

super_digit(P) = super_digit(148148148)
= super_digit(1+4+8+1+4+8+1+4+8)
= super_digit(39)
= super_digit(3+9)
= super_digit(12)
= super_digit(1+2)
= super_digit(3)
= 3
---------------------------------------------------------------------------------------------------------------------
In this video, we will be solving this Recursive Digit Sum problem in 3 different ways !
- Iteration
- Recursion
- Shortcut O(1)

Just visit the below website for code:-
Don't' Forget to Like, Share and Subscribe for future updates...
Thank you!!!!!!!!
After copying and pasting the code, still not working
Don't Worry I'm hereby to help you
Ping me on Instagram.

Рекомендации по теме
Комментарии
Автор

Bro but your code not according to constraints it want string in superdigit function

video_dekho_ok
join shbcf.ru