Let's Code Codewars - Codewars Challenges #1

  Рет қаралды 83,414

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 2 жыл бұрын
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.
@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.
@awaterplease7885
@awaterplease7885 3 жыл бұрын
Interesting and entertaining! Hope you'll make more.
@zettkusanagi6322
@zettkusanagi6322 Жыл бұрын
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.
@bananainapajama1573
@bananainapajama1573 3 жыл бұрын
Wish you do more like that, love your content ❤.
@sw-code6027
@sw-code6027 3 жыл бұрын
Amazing we need more content like this ❤
@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
@WeebDweebTCG
@WeebDweebTCG 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.
@simon3431
@simon3431 3 жыл бұрын
your channel is incredible dude.. please keep uploading videos 😁
@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
@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.
@TomBenRu
@TomBenRu 3 жыл бұрын
I like it very much, to follow your thuoghts step by step, Good idea, to make such a format.
@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)!
@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.
@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 .
@hosnymubark6528
@hosnymubark6528 3 жыл бұрын
5:10 You could actually do string.replace().replace().replace() All in one line.
@unrealcarol
@unrealcarol 9 ай бұрын
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!
@pythonbotofitsskt9286
@pythonbotofitsskt9286 3 жыл бұрын
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
@TalsonHacks
@TalsonHacks 3 жыл бұрын
This series is really interesting, and making it spontaneous made it even better.
@nelsonberm3910
@nelsonberm3910 Жыл бұрын
This seems so interesting thank you for sharing!
@joshuamarcano350
@joshuamarcano350 2 жыл бұрын
The amount of one line bandits on codewars is astronomical lol
@MattDvc
@MattDvc 3 жыл бұрын
Good way to learn tricks you may need in the future. more please.
@OkvEdit
@OkvEdit 3 жыл бұрын
this is amazing man! keep it up bro
@calmvolatility2787
@calmvolatility2787 3 жыл бұрын
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")))
@irshadtarsoo7734
@irshadtarsoo7734 3 жыл бұрын
Hope you do more episodes♥️💯
@dead3541
@dead3541 3 жыл бұрын
Love this..
@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
@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.
@jkf114
@jkf114 3 жыл бұрын
True legends writing one line lambdas for every kata
@Bryzey7
@Bryzey7 3 жыл бұрын
Would like to see more of this👍
@Revamped1953
@Revamped1953 2 жыл бұрын
cool that website looks fun! gotta check it out!
@jacekwopiuk1799
@jacekwopiuk1799 3 жыл бұрын
Yoy are great! I like, how you explain things
@RohitKumar-dv7bw
@RohitKumar-dv7bw 3 жыл бұрын
I liked so much. I hope, I will get such interesting videos in future.
@south828
@south828 8 ай бұрын
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 😶‍🌫
@mimurajam1501
@mimurajam1501 3 жыл бұрын
I liked that format
@giftchukwuemeka8324
@giftchukwuemeka8324 Жыл бұрын
i love this, more of this
@codingboy2254
@codingboy2254 3 жыл бұрын
Intro !
@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
@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 ???
@AaPerm
@AaPerm 2 жыл бұрын
Enjoy this episode quite a lot, hope it could become a series.
@s.aravindh6227
@s.aravindh6227 3 жыл бұрын
Nice video bro 👍👍👍
@NeuralNine
@NeuralNine 3 жыл бұрын
thank you ^^
@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.
@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
@watcharaponhongthong7869
@watcharaponhongthong7869 3 жыл бұрын
Very useful! Keep do it.
@lucario4399
@lucario4399 3 жыл бұрын
Woooooooowww
@aourfiidir4163
@aourfiidir4163 10 ай бұрын
if u tried using c that gonna be a mindblowing programme
@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]
@KR_Technical-hj3bf
@KR_Technical-hj3bf Жыл бұрын
In my college there is code war event . May i hope this will be helpful
@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.
@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.
@alexott50
@alexott50 3 жыл бұрын
Let’s we more of this
@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!
@JADE2238
@JADE2238 3 жыл бұрын
Bro we want more because it will increase our coding thinking skills so please make more on this topic
@hungariannerd8445
@hungariannerd8445 2 жыл бұрын
I'm still messed up about that Translate function - it doesnt work for me either!
@irshadtarsoo7734
@irshadtarsoo7734 3 жыл бұрын
👍💯
@lornemalvoo
@lornemalvoo 3 жыл бұрын
MORE!!!
@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.
@therostgame5024
@therostgame5024 3 жыл бұрын
Can you made a series like this but more easyest for beginners?
@atlantic_love
@atlantic_love 5 ай бұрын
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.
@ivanhelsing7378
@ivanhelsing7378 3 жыл бұрын
That`s cool man!
@NeuralNine
@NeuralNine 3 жыл бұрын
:)
@milanrbx5592
@milanrbx5592 3 жыл бұрын
Does playing code wars make you better at python?
@milindoox9453
@milindoox9453 3 жыл бұрын
Bro plz video for PyQt5 with Qt designer
@mert-fh2vx
@mert-fh2vx 3 жыл бұрын
thats a good content
@brunomiguel2084
@brunomiguel2084 3 жыл бұрын
do one in go !!
@Beny123
@Beny123 3 жыл бұрын
Good job!
@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])
@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?
@rustybolt_
@rustybolt_ Жыл бұрын
So what does the translate function do?
@bini420
@bini420 2 жыл бұрын
nice
@natasdabsi1138
@natasdabsi1138 7 ай бұрын
Please do more
@atlantic_love
@atlantic_love 5 ай бұрын
Who's more?
@guilherme5094
@guilherme5094 3 жыл бұрын
Very good!
@giannismakarounas5966
@giannismakarounas5966 3 жыл бұрын
Make more videos like that
@andrewcarranza1562
@andrewcarranza1562 2 жыл бұрын
your laying waste to the battlefield
@babiarzu95
@babiarzu95 2 жыл бұрын
Do you think codewars challenges are good way to learn?
@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 ^^
@laurentk2033
@laurentk2033 3 жыл бұрын
I've done a lot of 6-7 kyu in C and omg its so fucking ez in python lul
@mickyfazler
@mickyfazler 3 жыл бұрын
Please make video on complete zoom clone in python... Please... Thank you Sir.🧡
@NeuralNine
@NeuralNine 3 жыл бұрын
I have it already
@IzUrBoiKK
@IzUrBoiKK 3 жыл бұрын
Can we take part?
@NeuralNine
@NeuralNine 3 жыл бұрын
how do you want to take part?
@dontbetoxic4387
@dontbetoxic4387 3 жыл бұрын
What
@Imdazedandconfuzed
@Imdazedandconfuzed 2 жыл бұрын
# translate() one argument == a map dictionary_map = {‘H’: ’’, ‘J’: ’’} # one argument s = ‘Hello World! JJJJ HHHH’ s = s.translate(dictionary_map)
@lowlight1063
@lowlight1063 Жыл бұрын
duplicate_count oneliner: return len(text) - len("".join(list(set([l for l in text]))))
@opcon3155
@opcon3155 2 жыл бұрын
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 М.
25 nooby Python habits you need to ditch
9:12
mCoding
Рет қаралды 1,8 МЛН
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Easy Google Coding Interview With Ben Awad
28:00
Clément Mihailescu
Рет қаралды 1 МЛН
CodeWars vs HackerRank // The best way to learn programming?
15:29
Christian Lempa
Рет қаралды 36 М.
Coding Challenge 170: The Monty Hall Problem
32:16
The Coding Train
Рет қаралды 160 М.
How to Solve Coding Problems (the best way to learn)
12:29
Aaron Jack
Рет қаралды 240 М.
Learn To Code Like a GENIUS and Not Waste Time
9:41
The Coding Sloth
Рет қаралды 1,9 МЛН
How I Would Learn Python FAST (if I could start over)
12:19
Thu Vu data analytics
Рет қаралды 716 М.
ASMR Programming - Coding Pacman - No Talking
1:21:19
Servet Gulnaroglu
Рет қаралды 3 МЛН
Every Python Function Explained
23:22
Tech With Tim
Рет қаралды 116 М.
My Brain after 569 Leetcode Problems
7:50
NeetCode
Рет қаралды 2,7 МЛН
ASMR Programming - Coding a Snake Game - No Talking
24:06
Servet Gulnaroglu
Рет қаралды 665 М.
REAL or FAKE? #beatbox #tiktok
01:03
BeatboxJCOP
Рет қаралды 18 МЛН