Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Never thought of using the modulo operator that way! Excellent.
Thanks for expanding it! I'm still learning as well and there are a few things here I didn't notice myself.
If we don't look at the fact that this solution is absolutely terrible:
len
inside the loopta = a
and re-assigning it again iflen(a) > len(b)
for no reasonO(n^3)
time complexity because of terrible loops andif
'sreturn
insideif
blockThis one caught my eye--it's a pretty interesting approach to the problem! There are a lot of layers there for sure :) I'm honestly pretty new to programming myself, but it seems like your approach may be a bit of a roundabout way, though--there are a lot of simpler techniques you could use to get the job done.
A few of the things I noticed:
On the macro level:
On the micro level:
Great job getting the code to work though! A solution is a solution :)