Coffee, Code & Numbers - Codewars Challenges #10

  Рет қаралды 2,605

NeuralNine

NeuralNine

Күн бұрын

Пікірлер: 10
@13antonispao
@13antonispao 11 күн бұрын
That second one took me a while to find the pattern. For anyone struggling, here's an example for n=59884848459853: Basically, you: 1) loop through the number in list form backwards until you find a number smallest than the previous (example: 5-9853). Once you do: 2) you loop again backwards only on the part to the right of that number (example: 9853), until you find a number greater than the number (example: 8). Once you find it, swap them (example becomes: 598848484-89553). 3) Finally, reverse the part after the number you just swapped (example: 8-9553 becomes 8-3559). And you have the solution: 59884848483559. That was quite the exercise, thanks for these videos, I don't usually have the motivation to do these on my own. Hope to see more in the future!
@pronobgogoi2063
@pronobgogoi2063 9 күн бұрын
NeuralNine, please do more of these codewars. Helps a lot to understand how to approach a problem. Also, I am glad I came across your channel. 👍
@pronobgogoi2063
@pronobgogoi2063 9 күн бұрын
Man, the last one was an adventure. Keep them coming!!!
@cybermanne
@cybermanne 9 күн бұрын
In that second loop, when you are looking for the smallest digit that is still bigger than the digit you found in the first loop, you can just go from right to left and take the first digit that is bigger. This digit will also be the smallest (because otherwise the algorithm would've found another another digit to swap in the outer loop). So you don't need to go thru the rest of the digits and see if you can find a smaller digit.
@sp5xyz
@sp5xyz 12 күн бұрын
great video, thanks!
@R56A
@R56A 10 күн бұрын
Thanks for the video, it is really valuable to me.
@bobby_ridge
@bobby_ridge 11 күн бұрын
why isbn-10 seems so hard if this kata should be solved in 1-3 lines?
@myst9890
@myst9890 12 күн бұрын
18:10 I made the exact same mistake (and some more)
@rubanruban9843
@rubanruban9843 12 күн бұрын
Its nice but can you explain about machine learning and deep learning models usin streamlit
@nd7024
@nd7024 12 күн бұрын
Just FYI codewars don't like it when you share your solutions off the platform
Linked List - Data Structures in Python #1
48:54
NeuralNine
Рет қаралды 7 М.
The Vim Experience
45:19
Bog
Рет қаралды 123 М.
Which team will win? Team Joy or Team Gumball?! 🤔
00:29
BigSchool
Рет қаралды 12 МЛН
I tricked MrBeast into giving me his channel
00:58
Jesser
Рет қаралды 28 МЛН
Who's spending her birthday with Harley Quinn on halloween?#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 15 МЛН
Hash Map - Data Structures in Python #4
33:11
NeuralNine
Рет қаралды 743
2 Years Of Learning C | Prime Reacts
22:24
ThePrimeTime
Рет қаралды 305 М.
Radical Simplicity
45:53
ThePrimeTime
Рет қаралды 297 М.
The Strange Physics Principle That Shapes Reality
32:44
Veritasium
Рет қаралды 4,4 МЛН
One CPU To Rule Them All - Ryzen 7 9800X3D Review
12:47
Linus Tech Tips
Рет қаралды 708 М.
Where Does Bad Code Come From?
42:21
Molly Rocket
Рет қаралды 199 М.
What's New in Python 3.13?
19:02
NeuralNine
Рет қаралды 10 М.
Clean Code - Uncle Bob / Lesson 1
1:48:42
UnityCoin
Рет қаралды 1,9 МЛН
How to Get a Developer Job - Even in This Economy [Full Course]
3:59:46
freeCodeCamp.org
Рет қаралды 3 МЛН
Demand Forecasting For Stores - AI Project in Python
28:38
NeuralNine
Рет қаралды 4,4 М.
Which team will win? Team Joy or Team Gumball?! 🤔
00:29
BigSchool
Рет қаралды 12 МЛН