Learn from Leaders, Learn from ABC. Watch our latest technical videos in your language: For Hindi:- bit.ly/2TRuGVP For Kannada:- bit.ly/31NH63M For Telugu:- bit.ly/2MuYRRP For Tamil:- bit.ly/2Num5Hz
Hi from Russia! Your way to teaching is great! But for that task it is better to use another algoithm: for (int i = 0; i < charsLength/ 2; i++) { if (chars[i] != chars[charsLength -1 -i]) { isPalindrome = false; break; } } You shouldn't create second array, just iterate through your source chars.
Hi, ur explanation is too good to understand i am so poor when it comes to logics and i am worried can i really able to write logics on my own but now after seeing ur videos i got confidence
Hello Ravi Kumar Thanks for your valuable feedback and support. If you are new, Please subscribe to get updates about new videos in the following link: x.co/fresher
It is really helpful sir..Loved your way of explaining things .Now iam able to solve interview string questions... Hope I'll get some more videos on other data Structures..
You have missed the closing braces after while loop. Also there's no other statement after "continue" within the loop, hence there's no need to use "continue". Hope this would clarify your doubt.
continue statement not necessary here, only ++i or i++ would do fine! but for the matter of fact continue keyword skips all the following statements in the current iteration but "continues" with the next iteration
why did we write SOP(" palindrome") after the end of while loop; For Example : if the word is " civic " then it will print palindrome but if we print word like "civisc" , Then it will print something like this : non palindrome is palindrome plz help String name ="cisvic"; char [] a=name.toCharArray() ; int n = a.length; char [] b = new char[n]; int i=0; while(i
Access Modifiers help restrict the scope of programming elements such as variables, methods, constructors and classes. Addressing your query, If a class is declared as "public" then it can be accessed from anywhere within a project. So if you're sure that a particular class will not be accessed anywhere else, then it's not mandatory to declare the class as "public". You can either have "no modifier" (default - package specific) or have "public" modifier. However please note within a given Java file, there cannot be more than one public class defined.
Hi Bhavya Thank you for appreciating our work. We are glad to have helped. Do check out our other tutorial videos and subscribe to us to stay connected. :) x.co/fresher
Palindrome1.java:7: error: cannot find symbol int size=y.lenght; ^ symbol: variable lenght location: variable y of type char[] 1 error sir ,when i code this program this error will come in compile time.
Learn from Leaders, Learn from ABC.
Watch our latest technical videos in your language:
For Hindi:- bit.ly/2TRuGVP
For Kannada:- bit.ly/31NH63M
For Telugu:- bit.ly/2MuYRRP
For Tamil:- bit.ly/2Num5Hz
How much tuition for online training?
Hi from Russia! Your way to teaching is great! But for that task it is better to use another algoithm:
for (int i = 0; i < charsLength/ 2; i++) {
if (chars[i] != chars[charsLength -1 -i]) {
isPalindrome = false;
break;
}
}
You shouldn't create second array, just iterate through your source chars.
Hi frOm GeRmAnY
why not:
"returntype" checkPalindrome(String word) {
return word.equals(reverse(word));
//zack fertich
Hi, ur explanation is too good to understand i am so poor when it comes to logics and i am worried can i really able to write logics on my own but now after seeing ur videos i got confidence
Keep making video like this sir. It's really awesome. And do making video which helps us to enhance skill. Thank you, sir.
Hello Ravi Kumar
Thanks for your valuable feedback and support.
If you are new, Please subscribe to get updates about new videos in the following link:
x.co/fresher
This is awesome teaching sir we won't codeing in angular sir please post it also
It is really helpful sir..Loved your way of explaining things .Now iam able to solve interview string questions...
Hope I'll get some more videos on other data Structures..
Really helpful 🙌
Your Way of teaching is different which awesome 👍
Thank you for recognizing my contribution. We really appreciate your kind words and encouragement. Happy learning, Shubham!
Awesome video n explanation👏👏👏👌👌👌 sir thank you soo much..
We all put in a lot of effort; thank you for acknowledging our hard work. Happy learning, Santhoshi Vempati!
class palindrome
{
public static void main(String[] args)
{
String x="level";
char y[]=x.toCharArray();
int size =y.length;
char a[]=new char[size];
int i=0;
while(i!=size)
{
a[size-1-i]=y[i];
++i;
}
i=0;
while(i!=size)
{
if(a[i]!=y[i])
{
System.out.println("not palindrome");
System.exit(0);
}
else
{
++i;
continue;
}
System.out.println("palindrome");
}
}
}
sir
no error while compailing but not showing output .
clear me sir.
You have missed the closing braces after while loop. Also there's no other statement after "continue" within the loop, hence there's no need to use "continue". Hope this would clarify your doubt.
Great job I love the algorithms explanation
Glad you loved it! Happy learning, Adam!
Hai sir,
Plz do explain why continue statement is used here.
Thank you!
continue statement not necessary here, only ++i or i++ would do fine!
but for the matter of fact continue keyword skips all the following statements in the current iteration but "continues" with the next iteration
why did we write SOP(" palindrome") after the end of while loop;
For Example : if the word is " civic " then it will print palindrome
but if we print word like "civisc" , Then it will print something like this :
non palindrome
is palindrome
plz help
String name ="cisvic";
char [] a=name.toCharArray() ;
int n = a.length;
char [] b = new char[n];
int i=0;
while(i
Sir.. y can't we write code second p
While block in frst while block only and y u have used else part with continue.
sir ,why we write public before the class.
Access Modifiers help restrict the scope of programming elements such as variables, methods, constructors and classes. Addressing your query, If a class is declared as "public" then it can be accessed from anywhere within a project. So if you're sure that a particular class will not be accessed anywhere else, then it's not mandatory to declare the class as "public". You can either have "no modifier" (default - package specific) or have "public" modifier. However please note within a given Java file, there cannot be more than one public class defined.
@@ABCforTechnologyTraining thanq sir
Can’t we just use equals after reversing string and storing into other variable ??
yes, we can..just use boolean result = arrays.equals(a,b);......................if true then pallindrome , if not then not a pallindrome
its working only for non palindrome.. and for palindrome it's showing that it is terminated...
way of explaination is nice.
Hi Bhavya
Thank you for appreciating our work. We are glad to have helped. Do check out our other tutorial videos and subscribe to us to stay connected. :)
x.co/fresher
Palindrome1.java:7: error: cannot find symbol
int size=y.lenght;
^
symbol: variable lenght
location: variable y of type char[]
1 error
sir ,when i code this program this error will come in compile time.
You have misspelled "length" as "lenght". Rectify this and that will fix the error.
Prgm not executing and output console isn't displaying
Kindly share the program code here. We will resolve the issue for you.