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.
This comment is hidden because it contains spoiler information about the solution
Watch me, mom (from Heaven T^T ), I am in the #1 solution!! ^///^
Yeah, but it was just a coincidence that I had just seen bitwise being explained to me on leetcode in their video solution for this problem.
https://leetcode.com/explore/featured/card/the-leetcode-beginners-guide/692/challenge-problems/4425/
I thought it was pretty cool and looked it up, then I seen it in your solution here on the same day
When writing real code, clarity is the most important rule in practice, beyond doing smart tricks. You do NOT need to use bitwise operations in non-bitwise-based logic. We only did it because we're used to code golfing.
there are many ways to slove this without regex
I have just learned about bitwise operators today. I will, like you, start using them in practice.
nice but using the count method inside a loop can be inefficient for large lists because count iterates through the list each time it is called, leading to an overall time complexity
also the method is straightforward and easy to implement but may not be optimal for very large datasets.
I came up with a similar solution but did not put the second arguments in quotes. Is there practical difference?
WOWWWWWWWWWW :{
OP solved it, closing
true
cool
Well done
Nice solution. Forgot about the spread operator.
I think it would have been better if you had tried to get to the algorithm properly. You would have learned more. Using the solution is good when you already know how to get to the solution.
Loading more items...