to a string and from a string are both O(n) operations
would recommend just dividing the number by the base (10) until number is 0. Check remainder during iterations for 6 to know how much to add
2024-03-12 22:39:41
4
Michael Barrowman :
count ={"6":0,"9":0}
for c in s:
count[c] += 1
return int(count["9"]*"9" + count["6"]*"6")
2024-03-15 08:19:41
0
Greg Hogg :
Follow me to get asked for 69 😂😂
2024-03-12 14:55:01
0
Achint :
what’s the difference between j and i
2024-05-04 09:14:03
0
To see more videos from user @greghogg5, please go to the Tikwm
homepage.