Let's Code Codewars - Codewars Challenges #1

  Рет қаралды 81,965

NeuralNine

NeuralNine

Күн бұрын

Пікірлер: 104
@NeuralNine
@NeuralNine 3 жыл бұрын
In the beginning the code font size is a bit too small, but I increase it throughout the video, so don't worry! ^^
@IzUrBoiKK
@IzUrBoiKK 3 жыл бұрын
Np
@AndersJackson
@AndersJackson 3 жыл бұрын
You should try Ocaml/F#. That is a fun language, functional, where it also have Currying, that is partial application of arguments, so if you add one argument to few, you get a function with one argument.
@gi0rg0s17
@gi0rg0s17 3 жыл бұрын
If this becomes a series it will be very interesting. I am into competitive programming and it will be really important. Thank you for the amazing content!
@NeuralNine
@NeuralNine 3 жыл бұрын
it all depends on how many people watch it and for how long ^^
@imon2456
@imon2456 3 жыл бұрын
@@NeuralNine maybe just make it shorter and i am sure people will watch it
@haydeng.4116
@haydeng.4116 Жыл бұрын
Honestly man this is super helpful to see someone just work through some challenges.
@abo000Saad
@abo000Saad 3 жыл бұрын
Very interesting video, I hope we can see more like this in the future.
@zettkusanagi6322
@zettkusanagi6322 11 ай бұрын
I love how you show us your thinking process. I emphasize just finding a solution. After that, check to see other options. There are people who solve these with in ingenious ways.
@charan2446
@charan2446 3 жыл бұрын
Tip: If you are doing anything like code competition, at first just go for inefficient code if that passes the test then go back to code and modify your code efficiently. It will make it easier. It may take some time but it will help. I'm not a ultra pro programmer anything like that 😉 I'm still learning. What I'm saying is came from my experience. Hope it helps. Sorry for my English
@awaterplease7885
@awaterplease7885 3 жыл бұрын
Interesting and entertaining! Hope you'll make more.
@bananainapajama1573
@bananainapajama1573 3 жыл бұрын
Wish you do more like that, love your content ❤.
@PRAS223
@PRAS223 3 жыл бұрын
39:25 actually there is string method called strip(), it will remove all whitespaces, \t, in the beginning and end of a string.
@cadowyn735
@cadowyn735 3 жыл бұрын
Dude, you have some excellent proficiency and problem solving skills! Can tell because you can do a lot of this on the fly without a systematic breakdown of the problems in long-hand form. If you are new to programming, keep in mind that what he is doing is understanding the problem, thinking of the solution, and implementing it in syntax...in this case Python. I think the most difficult part when you're new is being able to translate a potential solution into code. Understand your problem. Think about the examples. Decide what data structure you're going to use. Write out your algorithm, and then code! You should spend most of your time solving the problem and understanding it, and then translating that solution to code. He knows the theoretical/logic portions of coding very well, and is proficient with the language, so NeuralNine can arrive at these solutions in a systematic manner. Most of you will probably have to write everything out in pseudo code and then translate it to actual code. And people shouldn't lose respect over your solution. lol Especially since that's a 5kyu and you're putting all of this out to the public. Great video good sir. Subscribed.
@navidmehdi6
@navidmehdi6 Жыл бұрын
This codewars thing looks like so much fun qnd the perfect way to practice. Im new to try and get into programming and this help me keep all the new concepts in my brain.
@muhammadahsan8251
@muhammadahsan8251 3 жыл бұрын
I come up with your channel few time ago. Really loved your content. These uncut videos are really amazing but I want to add something. Instead of going with all problems just select one problem that you think is quite challenging and only make video on that it will also save time
@sw-code6027
@sw-code6027 3 жыл бұрын
Amazing we need more content like this ❤
@TomBenRu
@TomBenRu 3 жыл бұрын
I like it very much, to follow your thuoghts step by step, Good idea, to make such a format.
@thomasgoodwin2648
@thomasgoodwin2648 3 жыл бұрын
Raw coding. Pure and unrefined. This so often what is precisely not taught in schools. ❤️❤️❤️ One question it raises: "What is an appropriate amount of time to spend on 'polishing the brass' vs 'close enough for gvmnt work' ?" Perhaps we need some sort of Big O for coding complexity as well as just runtime or resource management.
@simon3431
@simon3431 3 жыл бұрын
your channel is incredible dude.. please keep uploading videos 😁
@vardhanr8177
@vardhanr8177 3 жыл бұрын
thank you soooo much for this AMAZING video!!! this is such a coooool website that i did not know about before... it looks realllly fun... and would help a lottt with learning (for example: i didn't know about that ::-1 reverses the string thing before)!
@MattDvc
@MattDvc 3 жыл бұрын
Good way to learn tricks you may need in the future. more please.
@pythonbotofitsskt9286
@pythonbotofitsskt9286 2 жыл бұрын
Very entertaining content
@TwilightSun32
@TwilightSun32 Жыл бұрын
btw there is a 'fork' button under solution in codewars where one could check how solution works and compare performance as well
@osamaalhemiary9343
@osamaalhemiary9343 Жыл бұрын
Great job, man! This is a real creditable effort for which you are highly appreciated. If you don't mind, please keep this up casting some more videos of this kind.
@kiat4797
@kiat4797 3 жыл бұрын
for the last kata , the abstract solution is pretty simple and comprehensive , the new_plan list is used as a stack. A same problem that is a calssical problem in data structures : the parenthesis checker .Anyways i'm really enjoying with you this series, Road to 1kyu if possible. keep up the great work .
@unrealcarol
@unrealcarol 6 ай бұрын
Love this video, pls keep doing, hi from Brazil! I just disagree with this extreme need for smoothness, for example in the third challenge I believe, the split out of the list comprehension is much more readable, I liked your solution more then the one with the split inside the list comprehension. Most of the times it’s good to be objective but sometimes just putting everything inside the list comprehension doesn’t help with the readability. But incredibly anyway, keep doing it pls!
@nelsonberm3910
@nelsonberm3910 Жыл бұрын
This seems so interesting thank you for sharing!
@calmvolatility2787
@calmvolatility2787 2 жыл бұрын
looks like translate works in python 2 not 3 so that's why the disconnect between codwars and that w3schools page. return s.translate(s.maketrans(dict.fromkeys("aeiouAEIOU")))
@south828
@south828 5 ай бұрын
your 5th solution asks if we've encountered the letter before ( if letter.lower() not in occurred: ) occurred is a list and it's O(n) (can be very slow for large lists) you check it for every letter so overall time complexity is O(n^2) use sets or just use collections.Counter fun to watch you struggle anyway, we all can relate 😶‍🌫
@NielsPerfors
@NielsPerfors 3 жыл бұрын
The count problem: 1. Create a dict comprehension with key = letter, value = count of letter 2. Return the Len of a list comprehension with value of key > 1
@SIAMEInekeidijdnen
@SIAMEInekeidijdnen 3 жыл бұрын
this is amazing man! keep it up bro
@TalsonHacks
@TalsonHacks 3 жыл бұрын
This series is really interesting, and making it spontaneous made it even better.
@almaring2839
@almaring2839 3 жыл бұрын
For counting duplicates, why not use a map (or dictionary in Python) to store the number of occurrences of each letter (in a case-insensitive way), then traverse the map's key value pairs and add 1 to your result each time the value is greater than 1?
@NeuralNine
@NeuralNine 3 жыл бұрын
that seems to me like a worse runtime complexity. You would have to iterate through the whole string to count first (linear runtime) and then through all the key-value pairs. Besides that you have to use more memory to store all values. But sure it would also work.
@almaring2839
@almaring2839 3 жыл бұрын
@@NeuralNine I believe that your complexity is O(n*m) (n to iterate through the text and m each time you use the *in* operator within the loop), while my suggested solution is O(n+m) (n to iterate through the text with O(1) insertion time for the map, then m to iterate through the whole map).
@the-ghost-in-the-machine1108
@the-ghost-in-the-machine1108 Жыл бұрын
@@almaring2839 ur right bro.Furthermore, if it was asked to return the count for each duplicated letter in the questions , your solution would be a lot meaningful. Bytheway, i also solved the problem like you.
@RohitKumar-dv7bw
@RohitKumar-dv7bw 3 жыл бұрын
I liked so much. I hope, I will get such interesting videos in future.
@irshadtarsoo7734
@irshadtarsoo7734 3 жыл бұрын
Hope you do more episodes♥️💯
@hosnymubark6528
@hosnymubark6528 3 жыл бұрын
5:10 You could actually do string.replace().replace().replace() All in one line.
@jacekwopiuk1799
@jacekwopiuk1799 2 жыл бұрын
Yoy are great! I like, how you explain things
@joshuamarcano350
@joshuamarcano350 2 жыл бұрын
The amount of one line bandits on codewars is astronomical lol
@dead3541
@dead3541 3 жыл бұрын
Love this..
@Radical9535
@Radical9535 Жыл бұрын
cool that website looks fun! gotta check it out!
@jkf114
@jkf114 3 жыл бұрын
True legends writing one line lambdas for every kata
@Bryzey7
@Bryzey7 3 жыл бұрын
Would like to see more of this👍
@coolsav0074
@coolsav0074 3 жыл бұрын
❤️Hey I am following your go tutorial course. I know as a KZbinr you need views and (as per I know) go course are not getting that much view. But there are people like me who really want to learn go and need some detailed course. So if possible please at least make one video per week but don't just discontinue it. Really love your video and just fan of your video.
@AaPerm
@AaPerm 2 жыл бұрын
Enjoy this episode quite a lot, hope it could become a series.
@samoylov1973
@samoylov1973 Жыл бұрын
If shortest way to the destination matters in the last challenge, wrote another solution: lst = ['n', 's', 's', 'e', 'w', 'n', 'w'] def directions(lst): res_y = lst.count('n') - lst.count('s') res_x = lst.count('e') - lst.count('w') dir_y = 'n' * res_y if res_y > 0 else 's' * abs(res_y) dir_x = 'e' * res_x if res_x > 0 else 'w' * abs(res_x) return [*dir_x] + [*dir_y]
@giftchukwuemeka8324
@giftchukwuemeka8324 Жыл бұрын
i love this, more of this
@mimurajam1501
@mimurajam1501 3 жыл бұрын
I liked that format
@watcharaponhongthong7869
@watcharaponhongthong7869 3 жыл бұрын
Very useful! Keep do it.
@JADE2238
@JADE2238 3 жыл бұрын
Bro we want more because it will increase our coding thinking skills so please make more on this topic
@ivanhelsing7378
@ivanhelsing7378 3 жыл бұрын
That`s cool man!
@NeuralNine
@NeuralNine 3 жыл бұрын
:)
@DreadNought-n2b
@DreadNought-n2b 3 жыл бұрын
It's sad how people suffer due to lack of knowledge (most times I'm thinking of how to construct a for loop and he's already using an inbuilt function to make it easier 🤯🤯))
@sitter2207
@sitter2207 3 жыл бұрын
That's why codewars is amazing. I complete it with my trash solution, then check other people's 500iq solutions and learn from them. It's actually amazing to see those clever answers from other people. Or the trolls who hardcode 1000 lines lol.
@s.aravindh6227
@s.aravindh6227 3 жыл бұрын
Nice video bro 👍👍👍
@NeuralNine
@NeuralNine 3 жыл бұрын
thank you ^^
@mert-fh2vx
@mert-fh2vx 3 жыл бұрын
thats a good content
@aourfiidir4163
@aourfiidir4163 7 ай бұрын
if u tried using c that gonna be a mindblowing programme
@mohsenhaddadi1117
@mohsenhaddadi1117 3 жыл бұрын
39:35 Just don't pass any argument to split() function return arr.split() instead of arr.split(" ") and this will remove all 1 or 2 or 3 white spaces
@omari6108
@omari6108 2 жыл бұрын
Challenge #4 is still a bit confusing. I understand that you're using list comprehension, but I haven't seen it used the way you're using it. Typically the result variable comes first, then the for loop in which that variable will be used + additional expressions. In the way you're using it "word" is undefined in the beginning, yet you're operating on it (it yet doesn't have a value to reverse, or length to determine), then defining it later? I struggled writing it out the long way and hit a roadblock with using the four loop. As the iterator iterates over the list (the string having been split), the values are returned on a new line. I didn't know how to overcome that. Does the list comprehension being in a list prevent that? I understand what needs to be done, but not understanding how your solution arrived at the answer.
@Beny123
@Beny123 3 жыл бұрын
Good job!
@lucario4399
@lucario4399 3 жыл бұрын
Woooooooowww
@arissk_
@arissk_ 3 жыл бұрын
I think it would be awesome if you started some video series on python katas at codewars. The are thousands of codewars addicts!
@codingboy2254
@codingboy2254 3 жыл бұрын
Intro !
@guilherme5094
@guilherme5094 3 жыл бұрын
Very good!
@KR_Technical-hj3bf
@KR_Technical-hj3bf 10 ай бұрын
In my college there is code war event . May i hope this will be helpful
@alexott50
@alexott50 3 жыл бұрын
Let’s we more of this
@abhishekraibagi8239
@abhishekraibagi8239 Жыл бұрын
🎯 Key Takeaways for quick navigation: 01:40 🤖 The video is about solving Codewars challenges, starting from easy ones and progressing in difficulty. 02:07 🛡️ The first challenge tackled is removing exclamation marks from a given string, a simple task. 03:01 💼 A challenge is introduced to check if a string ends with a specific substring. 04:41 🤖 Another challenge involves removing vowels from a string. 10:16 💼 A more complex challenge is presented, requiring reversing words in a string with five or more letters. 16:06 🤖 The final challenge involves counting distinct case-insensitive alphanumeric characters that occur more than once in a given string. Multiple solutions are explored. 27:42 🗺️ This coding challenge involves optimizing directions by removing needless opposites (e.g., north-south, east-west) to save energy. 29:03 🔄 The approach to solving the challenge is recursive, checking for opposite directions and removing them until no changes are needed. 31:23 🧵 String manipulation is used to handle the directions, with joins, replacements, and splits being key operations. 38:06 🧹 Additional steps are taken to clean up the resulting string, including removing duplicate spaces and handling edge cases. 43:45 🤓 Alternative solutions involve more elegant approaches, such as using dictionaries and recursion to optimize the directions efficiently. Made with HARPA AI
@atlantic_love
@atlantic_love 3 ай бұрын
LOL at trying to capitalize off your guitars by placing them in the background. So many gullible people out there who will trust anyone who appears to display multiple talents, lol.
@ramsy-sploit22
@ramsy-sploit22 3 жыл бұрын
21:35 you can use dict soo you can add the key wich is the letter and his value is the number of the times have being theis letter appird in the text with that way you can use update method to update the number of the time only ???
@hungariannerd8445
@hungariannerd8445 Жыл бұрын
I'm still messed up about that Translate function - it doesnt work for me either!
@therostgame5024
@therostgame5024 3 жыл бұрын
Can you made a series like this but more easyest for beginners?
@atharAkru
@atharAkru 2 жыл бұрын
bro! I think you are making this video for advance learner, as you are using very hard syntax without explaining, so how do i get? 15:19 thank god i saw the other method there.
@themihanoid5020
@themihanoid5020 2 жыл бұрын
Isn't the whole point of coding challenges to learn how algorithms like "replace" or "endswith", etc. work under the hood and try to replicate that, not just use them?
@milanrbx5592
@milanrbx5592 3 жыл бұрын
Does playing code wars make you better at python?
@nordgaren2358
@nordgaren2358 3 жыл бұрын
On counting duplicates, couldn't you have done something like the set count from the regular string count and return that? If it's even it returns 0, if set is less, then it returns how many duplicates there were.
@nordgaren2358
@nordgaren2358 3 жыл бұрын
Actually, now that I read the test requirements, it's not asking how many total duplicates, just how many letters have duplicates.
@nordgaren2358
@nordgaren2358 3 жыл бұрын
Here was the solution I came up with, though Spoilers ------ from collections import Counter def duplicate_count(text): return len([k for k,v in Counter(text.lower()).items() if v>1])
@lornemalvoo
@lornemalvoo 3 жыл бұрын
MORE!!!
@bini420
@bini420 2 жыл бұрын
nice
@brunomiguel2084
@brunomiguel2084 3 жыл бұрын
do one in go !!
@irshadtarsoo7734
@irshadtarsoo7734 3 жыл бұрын
👍💯
@milindoox9453
@milindoox9453 3 жыл бұрын
Bro plz video for PyQt5 with Qt designer
@rustybolt_
@rustybolt_ Жыл бұрын
So what does the translate function do?
@giannismakarounas5966
@giannismakarounas5966 3 жыл бұрын
Make more videos like that
@natasdabsi1138
@natasdabsi1138 4 ай бұрын
Please do more
@atlantic_love
@atlantic_love 3 ай бұрын
Who's more?
@babiarzu95
@babiarzu95 2 жыл бұрын
Do you think codewars challenges are good way to learn?
@andrewcarranza1562
@andrewcarranza1562 2 жыл бұрын
your laying waste to the battlefield
@mickyfazler
@mickyfazler 3 жыл бұрын
Please make video on complete zoom clone in python... Please... Thank you Sir.🧡
@NeuralNine
@NeuralNine 3 жыл бұрын
I have it already
@insert9124
@insert9124 3 жыл бұрын
U know a video did good when it got 1/10 likes
@NeuralNine
@NeuralNine 3 жыл бұрын
I am really happy that you like it ^^
@Imdazedandconfuzed
@Imdazedandconfuzed 2 жыл бұрын
# translate() one argument == a map dictionary_map = {‘H’: ’’, ‘J’: ’’} # one argument s = ‘Hello World! JJJJ HHHH’ s = s.translate(dictionary_map)
@IzUrBoiKK
@IzUrBoiKK 3 жыл бұрын
Can we take part?
@NeuralNine
@NeuralNine 3 жыл бұрын
how do you want to take part?
@dontbetoxic4387
@dontbetoxic4387 3 жыл бұрын
What
@laurentk2033
@laurentk2033 3 жыл бұрын
I've done a lot of 6-7 kyu in C and omg its so fucking ez in python lul
@lowlight1063
@lowlight1063 9 ай бұрын
duplicate_count oneliner: return len(text) - len("".join(list(set([l for l in text]))))
@opcon3155
@opcon3155 Жыл бұрын
For vowel removal, my way would be : “”.join([char for char in string if char not in list_of_vowels])
Anagrams & Bit Counting - Codewars Challenges #2
31:03
NeuralNine
Рет қаралды 8 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 480 М.
Миллионер | 2 - серия
16:04
Million Show
Рет қаралды 1,7 МЛН
How I Turned a Lolipop Into A New One 🤯🍭
00:19
Wian
Рет қаралды 12 МЛН
TOO MUCH FOR MY BRAIN... - Codewars Challenges #4
1:01:14
NeuralNine
Рет қаралды 10 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 191 М.
Minimax Algorithm for Tic Tac Toe (Coding Challenge 154)
26:33
The Coding Train
Рет қаралды 813 М.
Replit CEO Builds an App with 100% AI in 20 Min: Future of Coding?
41:18
Solve This Coding Problem and Win $200
8:06
Kenny Gunderman
Рет қаралды 2,4 МЛН
Cracking Enigma in 2021 - Computerphile
21:20
Computerphile
Рет қаралды 2,5 МЛН
Coding Challenge 170: The Monty Hall Problem
32:16
The Coding Train
Рет қаралды 158 М.
10 Important Python Concepts In 20 Minutes
18:49
Indently
Рет қаралды 224 М.
ASMR Programming - Coding Pacman - No Talking
1:21:19
Servet Gulnaroglu
Рет қаралды 2,8 МЛН