Palindrome Number | Leetcode problem 9

  Рет қаралды 26,885

Technosage

Technosage

Жыл бұрын

Palindrome Number problem.
Leetcode problem number 9.
JAVA interview programming playlist:
• Interview Programming ...
#java #interviewquestions #leetcode

Пікірлер: 28
@roqyaquran241
@roqyaquran241 Жыл бұрын
Great job, thank you👍😊
@daylanbueno
@daylanbueno 10 ай бұрын
Great solution. nice work.
@vickykarma2846
@vickykarma2846 2 ай бұрын
Your explanation is excellent😊
@puneetpal1466
@puneetpal1466 Жыл бұрын
Well explained...
@SumitChouhan-ss5tt
@SumitChouhan-ss5tt 15 күн бұрын
I just have a silly questions?? How much time the loop run ???
@nilesh_dac841
@nilesh_dac841 Жыл бұрын
you are doing very nice work mam ,please upload some more videos on array 🙏🙏🙏
@thefourhourtalk
@thefourhourtalk 4 ай бұрын
super easy explanation thanks
@saishankar5005
@saishankar5005 4 ай бұрын
Very good explanation madam!!
@AhmadRaza-ff1rk
@AhmadRaza-ff1rk Жыл бұрын
hey, it's not reversing the example -121 ad 121- , by logically it's also not possible because we are dealing with number no with string int x=154; int temp=x; int rev=0; while(x!=0){ rev= rev *10 + x%10; x =x/10; } System.out.println(rev); if (temp==rev){ System.out.println("Yes"); }else{ System.out.println("no")
@TechnosageLearning
@TechnosageLearning Жыл бұрын
Hi This problem is to check if a "number" is palindrome or not .so it ll work for numbers only
@sumitSdhondikar
@sumitSdhondikar Ай бұрын
vs code me public boolean method write kiya to code run nhi huwa kiyu
@AjaysFrictionLab
@AjaysFrictionLab Жыл бұрын
thank you mam
@nikhilnanhe3410
@nikhilnanhe3410 11 ай бұрын
Cool
@harshojha6118
@harshojha6118 7 ай бұрын
what is the recursive solution of this
@zohebansari6429
@zohebansari6429 11 ай бұрын
Can you tell why it is not wrking for negative number ??
@TechnosageLearning
@TechnosageLearning 11 ай бұрын
Because negative numbers are not palindrome numbers...if yoh reverse -131...Reverse would be 131-....both are not equal...so its not a palindrome number
@zohebansari6429
@zohebansari6429 11 ай бұрын
​@@TechnosageLearningcan you tell me what I had to make changes in code so it work with negative number public boolean isPalindrome(int x) { int rem = 0; int temp = x; int rev = 0; while (temp != 0) { rem = temp % 10; rev = rev * 10 + rem; temp = temp / 10; } if (rev == temp) { return true; } else { return false; } } }
@MaheshKumar-mt5wp
@MaheshKumar-mt5wp 11 ай бұрын
@@zohebansari6429 public boolean isPalindrome(int x) { if(x
@amanparmar1170
@amanparmar1170 2 ай бұрын
Can we also solve the same problem with help of for loop
@reon_fernandes
@reon_fernandes 26 күн бұрын
While loop?
@empty_peace
@empty_peace Жыл бұрын
*why it's wrong??!!!* (c++) #include using namespace std; int main() { int x ; cin>>x; int n = x ; if(x > 0) { int rev = 0 ; while(x > 0) { rev = (rev*10) + (x%10) ; x /= 10 ; } if(n == rev) { cout
@DOINGSOLUTIONS
@DOINGSOLUTIONS 11 ай бұрын
IT DOES NOT WORK AS 1234567899 IS NOT A NOT IN RANGE
@TechnosageLearning
@TechnosageLearning 11 ай бұрын
It will return false in this case!
@samadkhan3703
@samadkhan3703 11 ай бұрын
if number is 11 then it will throw false
@TechnosageLearning
@TechnosageLearning 11 ай бұрын
No..its returning true..Please try!
@JS_shorts_dev
@JS_shorts_dev Жыл бұрын
this is not going to work on all test case like number 10 and you didn't solve on leetcode...next time show your leetcode code also
@TechnosageLearning
@TechnosageLearning Жыл бұрын
It is working for all the scenarios..I have tested on leetcode..please take the code from git and then give it a try..and in recent videos i am showing it on leetcode as well
@dohongquank15hl39
@dohongquank15hl39 10 ай бұрын
if (x
Two Sum problem | Leetcode problem 1
8:20
Technosage
Рет қаралды 14 М.
Palindrome Number - Leetcode 9 - Python
12:00
NeetCode
Рет қаралды 66 М.
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
Самый Молодой Актёр Без Оскара 😂
00:13
Глеб Рандалайнен
Рет қаралды 7 МЛН
Cool Items! New Gadgets, Smart Appliances 🌟 By 123 GO! House
00:18
123 GO! HOUSE
Рет қаралды 17 МЛН
Does size matter? BEACH EDITION
00:32
Mini Katana
Рет қаралды 20 МЛН
Pointers and dynamic memory - stack vs heap
17:26
mycodeschool
Рет қаралды 1,4 МЛН
LeetCode Problem: 9. Palindrome Number  | Java Solution
10:59
Code for Interview
Рет қаралды 4,4 М.
How to Find Next Palindrome Number in Java | Coding Skills
5:39
Coding Skills
Рет қаралды 4,6 М.
How to Start Leetcode in 2024 (as a beginner)
8:45
Ashish Pratap Singh
Рет қаралды 751 М.
Leetcode 9. Palindrome Number [Java]
6:49
if else statement
Рет қаралды 5 М.
Array vs. ArrayList in Java Tutorial - What's The Difference?
17:36
Coding with John
Рет қаралды 506 М.
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН