Sir I love your videos I'm from Pakistan.exited for your next video on your main channel
@YiTseng4 жыл бұрын
6:45 Joma: imagine if I had another odd number.... Me: (think K...) Joma: for example like K.... Me: what!?
@debasishphukon53454 жыл бұрын
Please keep posting this is some amazing content right here
@RecursiveLoops4 жыл бұрын
Technically the correct time complexity is Θ(n). Reading the input string requires Θ(n) and reading the dictionary requires O(n). Θ(n) + O(n) = Θ(n) I'm not opinionated, but if you state that this algorithm runs in O(n) it means that the worst case is linear; this implies the existence of some cases where the algorithm runs better, but it is not true because the reading of the input string defines the algorithm's lower bound in terms of time complexity. In any case great video and I wish you the best of luck with your new project :)
@doboy4 жыл бұрын
It's both, everything that is Θ(n) is also O(n) but not vice versa.
@RecursiveLoops4 жыл бұрын
Zack Do yes, but one of them is simply more precise :) In this case it's easy to calculate Big Theta and gives more information about the time complexity. I know that Big O is more mainstream than Big Theta...
@aadityabhetuwal59904 жыл бұрын
it' not gonna be O(n) if you use set() because it removes all duplicates and iteration can be performed in n/2 + 1 passes for the worst case.
@samuelemerlin4 жыл бұрын
This was the first problem I solved with Python 💪
@wettaco69384 жыл бұрын
Question : why can't we just reverse the string and test if the reversed version = string ?
@devinh.96834 жыл бұрын
because they will give you strings that could be palindrome, but not currently a palindrome. This solution will work only if the string they give you is currently a palindrome.
@aadityabhetuwal59904 жыл бұрын
easy python solution using itertools: import itertools as it def find_palindrome(st): st = st.lower() x = list(it.permutations(st, len(st))) for i in x: s1 = "".join(i) flag = False if s1 == s1[::-1] : return s1 return False print(find_palindrome( input() ))
@aryaman_godara4 жыл бұрын
qqaao ... we can make pa;indrome , bro are you sick or am i hogh too much ???
@whistletoe4 жыл бұрын
Why can’t qqaao be made into a palindrome? Like qaoaq?
@JomaClass4 жыл бұрын
The example was qqaaao, not qqaao
@whistletoe4 жыл бұрын
Joma Class Oooh sorry my screen was too small lmao
@pedroalonsoms3 жыл бұрын
great video thanks
@SunsetRacer4 жыл бұрын
Now joma being a ronin. There is no more naniiiii😒
@ws_zilch4 жыл бұрын
Thanks jomaoppa :)
@bridgegolden2384 жыл бұрын
what happened to the old logo 😭
@hugelevin4 жыл бұрын
Can you provide a simplified Java code version of this exercise? I have managed to do it using HashMap but have a lot of code while yours seems so simple. Thanks.
@colinking734 жыл бұрын
Puh-linndrahm
@KuaisArts4 жыл бұрын
great video but the way you say palindrome tho...
@hectorsvill4 жыл бұрын
😄
@rudraprasaddash38094 жыл бұрын
How about this:- def isPalindrome(s): If (s==s[::-1]): return True return False 🤔🤔
@JomaClass4 жыл бұрын
The question asks if a string can be rearranged to BE a palindrome. It doesn’t just check if it’s a palindrome. So for example, “dda” should return true because it can be rearranged to “dad”