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.
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!
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.
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
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.
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.
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)!
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.
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
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!
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 .
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.
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
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 😶🌫
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")))
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?
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.
@@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).
@@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.
❤️Hey I am following your go tutorial course. I know as a UA-camr 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.
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 🤯🤯))
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.
🎯 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
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.
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 ???
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.
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.
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.
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])
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?
In the beginning the code font size is a bit too small, but I increase it throughout the video, so don't worry! ^^
Np
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.
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!
it all depends on how many people watch it and for how long ^^
@@NeuralNine maybe just make it shorter and i am sure people will watch it
Honestly man this is super helpful to see someone just work through some challenges.
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.
Very interesting video, I hope we can see more like this in the future.
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
Wish you do more like that, love your content ❤.
Interesting and entertaining! Hope you'll make more.
39:25 actually there is string method called strip(), it will remove all whitespaces, \t,
in the beginning and end of a string.
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.
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.
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)!
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.
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
Amazing we need more content like this ❤
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!
Very entertaining content
btw there is a 'fork' button under solution in codewars where one could check how solution works and compare performance as well
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 .
your channel is incredible dude.. please keep uploading videos 😁
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.
I like it very much, to follow your thuoghts step by step, Good idea, to make such a format.
This series is really interesting, and making it spontaneous made it even better.
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
5:10
You could actually do string.replace().replace().replace()
All in one line.
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 😶🌫
Hope you do more episodes♥️💯
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")))
Love this..
Good way to learn tricks you may need in the future. more please.
This seems so interesting thank you for sharing!
this is amazing man! keep it up bro
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?
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.
@@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).
@@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.
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]
Would like to see more of this👍
Yoy are great! I like, how you explain things
cool that website looks fun! gotta check it out!
I liked that format
The amount of one line bandits on codewars is astronomical lol
❤️Hey I am following your go tutorial course. I know as a UA-camr 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.
Woooooooowww
i love this, more of this
Enjoy this episode quite a lot, hope it could become a series.
True legends writing one line lambdas for every kata
I liked so much. I hope, I will get such interesting videos in future.
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 🤯🤯))
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.
Very useful! Keep do it.
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
if u tried using c that gonna be a mindblowing programme
I think it would be awesome if you started some video series on python katas at codewars. The are thousands of codewars addicts!
Bro we want more because it will increase our coding thinking skills so please make more on this topic
That`s cool man!
:)
🎯 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
Intro !
In my college there is code war event . May i hope this will be helpful
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.
👍💯
Nice video bro 👍👍👍
thank you ^^
Let’s we more of this
Good job!
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 ???
thats a good content
Very good!
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.
I'm still messed up about that Translate function - it doesnt work for me either!
Can you made a series like this but more easyest for beginners?
Does playing code wars make you better at python?
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.
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.
Actually, now that I read the test requirements, it's not asking how many total duplicates, just how many letters have duplicates.
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])
nice
MORE!!!
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?
Bro plz video for PyQt5 with Qt designer
do one in go !!
Make more videos like that
So what does the translate function do?
# translate() one argument == a map
dictionary_map = {‘H’: ’’, ‘J’: ’’} # one argument
s = ‘Hello World! JJJJ HHHH’
s = s.translate(dictionary_map)
Please make video on complete zoom clone in python... Please... Thank you Sir.🧡
I have it already
Do you think codewars challenges are good way to learn?
Please do more
Who's more?
your laying waste to the battlefield
I've done a lot of 6-7 kyu in C and omg its so fucking ez in python lul
U know a video did good when it got 1/10 likes
I am really happy that you like it ^^
Can we take part?
how do you want to take part?
What
For vowel removal, my way would be :
“”.join([char for char in string if char not in list_of_vowels])
duplicate_count oneliner:
return len(text) - len("".join(list(set([l for l in text]))))