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.
Regarding the above solution: would it not be O(n)? Iterating through the list of ascii characters is O(1) – it always iterates through the 26 characters of the alphabet. Thus, checking the input of length n results in O(26 * n) = O(n). Dissenters welcome.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
i did something similar to that with a dict and exiting as soon as the value(number of appearance) of a key(letter) is more than 1.
This comment is hidden because it contains spoiler information about the solution
ohhh good to know! ty very much
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
quick question for anyone who sees this.
if you check my solution would it be similar/faster/slower as i dont use a for loop i only directly use the range to generate my list of numbers.
(just trying to learn about code complexity/process speed of different methods of coding)
decided to waste a bit of the servers time ¯_(ツ)_/¯
maybe if you're lucky you'll get it before it times out