ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
def palindrome(n): length=len(n) for i in range(length//2): if n[i]!=n[len(n)-i-1]: return False return True n=input("Enter number or string to check palindrome: ")result=palindrome(n)if result: print("Palindrome")else: print("Not Palindrome")
Nice question da and animation super ✨✨🥳🥳
Thanks na🥳🥳🥳😅
Super question 💫💫
😊😊😊
Is time complexity O(1)? Shouldn't it be O(N) where N is number of digits?
Aama bro 😅😅 ... Its corrected...
String aa convert panni check pannalam 😅😅
Yes absolutely right👏👏👏👍
2 approach panalam 1. String Builder use panalam2. Linear search start and end variable vachu try panalam1st iku O(1) varum2nd iku O(N/2) so O(N) varum
Awesome bro👏👏👏👍
def palindrome(n):
length=len(n)
for i in range(length//2):
if n[i]!=n[len(n)-i-1]:
return False
return True
n=input("Enter number or string to check palindrome: ")
result=palindrome(n)
if result:
print("Palindrome")
else:
print("Not Palindrome")
Nice question da and animation super ✨✨🥳🥳
Thanks na🥳🥳🥳😅
Super question 💫💫
😊😊😊
Is time complexity O(1)? Shouldn't it be O(N) where N is number of digits?
Aama bro 😅😅 ... Its corrected...
String aa convert panni check pannalam 😅😅
Yes absolutely right👏👏👏👍
2 approach panalam 1. String Builder use panalam
2. Linear search start and end variable vachu try panalam
1st iku O(1) varum
2nd iku O(N/2) so O(N) varum
Awesome bro👏👏👏👍