Explore tweets tagged as #AddDigits
@Udit16039309
Udit
4 years
Day 8: addDigits @scaler_official #scalerdiscord
0
0
1
@me__somesh
BLA��K K1πG
1 year
Excited to kick off the #75daysofleetcode challenge! 🎉 It's #day1 and today I solved the #AddDigits and #ReverseInteger problems in C++. Looking forward to leveling up my #DSA skills through this journey! 💻 #LeetCode #Challenge #100DaysOfCode #CodingJourney #BeginnerToPro
0
0
3
@AasthaS_
Aastha.
2 years
Day 2 of #100DaysOfCode! Explored Concepts: Python basics, subscripting, type checking, strings, num manipulation, f-strings. 🚀 Mini-projects: AddDigits, BMI Calculator, LifeInWeeks, TipCalculator Join me in this coding adventure - https://t.co/CxTpuoGmsu
1
0
0
@BeginnerPro27
BeginnerProgrammer
5 months
📅 Day 217 – LeetCode #258 🧮 Add digits until one remains 🔁 Used recursion, then optimized to O(1) 💡 Digital root = 1 + (num - 1) % 9 🔥 Math tricks rock! #Java #LeetCode #AddDigits #MathTrick #DigitalRoot #300DaysOfCode #ProblemSolving
0
0
2
@YoCodingTeacher
Your Coding Teacher | Programming Tips
5 years
Given a non-negative integer num, repeatedly add all its digits until the result has only one digit. int addDigits(int sum) { while(sum > 9){ int n {0}; while(sum != 0){ n += sum % 10; sum /= 10; } sum = n; } return sum; }
0
1
13
@AddDigits
steve wachira
16 years
it takes two to tangle
0
0
0
@AddDigits
steve wachira
16 years
You must be very sexy Erika...what you doing now?
0
0
0
@bendaho
ИнженерЪ
2 years
def addDigits(x): if x == 0: return 0 res = x % 9 if res == 0: return 9 return res
1
0
0
@SolutionZip
SolutionZIP
4 years
DL: https://t.co/GzIsKrP7A4 Create a second program named Lab6A2 that will read an unknown number of integers from a text file and add up the digits in each number. o Write a function named addDigits that will accept a string version of a number and will do the ...
0
0
0
@funkyJoleisa
korv inte korv
2 years
else:  res = 0  for a in str(num):   res = res + int(a)   Проводим суммирование по разрядам числа, которое я скопипастила из функции summ. Осталось последнее: запустить цепочку рекурсии и вызвать функцию от себя самой. return self.addDigits(res)
1
0
0
@CodingDSA
Coding DSA
10 years
Splitting a number and then adding the digits using division https://t.co/lu0Md6MlAx public int addDigits(int num) { if( num <= 9 ) retu…
0
0
0
@SurekhaSriniva
Surekha Srinivasan
8 years
9th Day of #gitmas Today I learnt an algorithm to add digits that user enters (which is a string). Here is the link https://t.co/RnHOGr4Tz9 #RICodePush, @careerdevs
0
0
2
@DwntwnDave
David Osborne
6 years
#MWRFinancial Home of the #InstantPayRaise - click and see how an #InstantPayRaise change your life #ShiftYourIncome #AddDigits and #MakeWealthReal for you!! Click on the link and find out!!
0
1
1
@DwntwnDave
David Osborne
6 years
#MWRFinancial - Home of the #InstantPayRaise where an #InstantPayRaise or #IPR can #ShiftYourIncome #AddDigits or #ChangeYourLife!! Click here to watch the videos!! Find out what an #InstantPayRaise #IPR can do for you!!
0
1
1
@DwntwnDave
David Osborne
6 years
MWR Financial - Home of the Instant Pay Raise!! Stop scrolling and find how an #InstantPayRaise can change your life!! #ShiftYourIncome #AddDigits #MakeWealthReal Click here and watch the video which can change your life!!
0
1
1
@NathnaelDev
NathnaelDev
1 year
simple class Solution: def addDigits(self, num: int) -> int: if num == 0: return 0 elif num % 9 == 0: return 9 else: return num % 9
@NathnaelDev
NathnaelDev
1 year
Today leetcode question. My initial approach was to use a loop or recursion but won't work. Try to do it with space and time complexity of O(1) #leetcode #DSA
0
0
1