Anagram | Check whether two strings are Anagram of each other | Java

  Рет қаралды 32,982

B Tech Computer Science

B Tech Computer Science

2 жыл бұрын

#Java #CoreJava #Collections #javaForBeginners Check out my Anime Store - anime-stoze.blinkstore.in
Subscribe to my channel so that you do not miss any topics.
The phone I used to record - amzn.to/34V1uqX
Phone stand used - amzn.to/3igP9QZ
Lighting I used - amzn.to/3IpYyQO
My laptop - amzn.to/3L1gt1Z
My gaming Keyboard - amzn.to/3Jt66mY
My gaming Mouse - amzn.to/36B4eKE
Headphones - amzn.to/3u3RnbC
Find the code for the above program here - musclecode.blogspot.com/2022/...
My other videos-
Finding Reverse of a Number - • Finding Reverse of a N...
Check if the given number is Prime Number - • Check if given number ...
Finding Minimum and Maximum value from an Array - • Finding Minimum and Ma...
Area and Perimeter of Rectangle - • Area and Perimeter of ...
Program to check if a string is Palindrome - • Palindrome | Program ...
Find the sum of digits of a number - • Find sum of digits of ...
Count the number of Digits of a Number - • Count the number of Di...
Java program to print Fibonacci Series - • Java program to print ...
Find Factorial of a number - • Find Factorial of a nu...
Check if a given year is Leap Year - • Check if a given year...
C++ program to Swap two numbers (Using extra variable) - • C++ program to Swap tw...
C++ program to find if a number is ODD or EVEN - • C++ program to find if...
C++ program to find Quotient and Remainder - • C++ program to find Qu...
C++ program to find Sum, Difference, Product, and Divison of two numbers - • C++ program to find Su...

Пікірлер: 33
@coolguy2066
@coolguy2066 Жыл бұрын
It is the best anagram video I found on the internet. So clear. Great handwriting too.
@NZIT1
@NZIT1 Жыл бұрын
Very informative tutorial about anagram. Thanks
@thebrothers6880
@thebrothers6880 Жыл бұрын
helped me alot confused about this problem and code given by my teacher is very complex thanks brother keep doing irt
@ShivamSingh-gc6pm
@ShivamSingh-gc6pm Жыл бұрын
Thankyou sir 😊 Very helpful....
@user-jo3gs1km6d
@user-jo3gs1km6d Ай бұрын
Thank you so much for this tutorial .🤗
@SilentAngelD
@SilentAngelD Жыл бұрын
this program is showing error while executing🙄
@nawwintphyu1873
@nawwintphyu1873 3 ай бұрын
Thank you!
@TurboThrottle200Rider
@TurboThrottle200Rider 3 ай бұрын
best explaination sir very easy and simply helpful
@AmitYadav-nz5if
@AmitYadav-nz5if Жыл бұрын
please note that last line you wrote for printing anagram will print every now and then until loop becomes 0..so you can use if loop to print properly.
@RahulKumar-sx8hm
@RahulKumar-sx8hm Жыл бұрын
bro vedio is super plz do on more vedios on strings like removing duplicate elements in the strings etc
@rachamallidorasrivignesh4499
@rachamallidorasrivignesh4499 4 ай бұрын
Tq so much brother❤❤❤❤
@whyu8012
@whyu8012 2 жыл бұрын
Super bro
@knowledgegetter
@knowledgegetter 8 ай бұрын
Best one!
@districte7177
@districte7177 9 ай бұрын
You explained it really well tbh. Next time please add the time complexity.
@ankurrunthala
@ankurrunthala Жыл бұрын
Gajab
@saibaba3692
@saibaba3692 2 жыл бұрын
Nice
@KatikaAmrutha-vd2xe
@KatikaAmrutha-vd2xe 3 ай бұрын
For me Arrays.sort(c1); Arrays.sort(c2); Showing error
@amitamishra8210
@amitamishra8210 Жыл бұрын
but after loop it will always print anagram string so what is the logic behind this
@thahirThavvagunta
@thahirThavvagunta 10 ай бұрын
Nice explanation 👏. I want to add one point, here the time complexity for the code you wrote is very high O(n) converting string to array 2xO(nlog(n)) for sorting O(n) Overall i feel nlog(n) as time complexity
@theintrovert894
@theintrovert894 9 ай бұрын
ya he should go with Frequency array which will give t(n) around O(n)
@faizalyakub9380
@faizalyakub9380 Жыл бұрын
Brother can you help me in the below question. Suppose a string id given "Today is sunday" and interviewer asked me to find day occures howmany times and at what position.(Hint: position must be of only "d" like 2,12 & without using built in methods)
@proxy5061
@proxy5061 Жыл бұрын
By built in method you can use like first;;;; String[] strngarr = strng.split(" "); Loop that words now , inside and check strng.indexOf("day") If user defined means Split and loop as shown above Inside loop Check for every sequence occurence of string day ,,, like For (){ Str[i] == d str[i+1] == a str[i+2] == y This is just plane we have to enhance little bit u will get this inguess
@BharathKumar-nf6xt
@BharathKumar-nf6xt 11 ай бұрын
Why cant we use equal() method bro..
@pshpshh2845
@pshpshh2845 Жыл бұрын
bro i love you greetings from germany
@BTechComputerScience
@BTechComputerScience Жыл бұрын
So nice to have students from other countries ❤
@prasadpatil4016
@prasadpatil4016 8 ай бұрын
Best
@Hitu619
@Hitu619 5 ай бұрын
Bro,please give logic in mathematical approach of coding
@BTechComputerScience
@BTechComputerScience 5 ай бұрын
Hi, coding is nothing but talking too computer, it's like asking the computer to do some task for u... so there is nothing like mathematical approach of coding. For some problems u need to understand maths to tell the computer how to solve it. Not all coding problem requires maths... coding requires logical thinking and problem solving. Hope u can now strengthen those things and grow😊
@Hitu619
@Hitu619 5 ай бұрын
@@BTechComputerScience kk bro
@rupasrithati8960
@rupasrithati8960 Жыл бұрын
Why char to chararray
@shiny.5019
@shiny.5019 Жыл бұрын
Strings doesn't have a built-in sort method but charArray does!! so we convert the string into charArray and apply the methods
@AmitYadav-nz5if
@AmitYadav-nz5if Жыл бұрын
Here i the corrected code from my end import java.util.Arrays; public class Anagram_or_not { public static void main(String[] args) { String str1 = "SILENT"; String str2 = "LISTEN"; char ch1[] = str1.toCharArray(); char ch2[]= str2.toCharArray(); boolean status = false; Arrays.sort(ch1); Arrays.sort(ch2); if (ch1.length!= ch2.length) { System.out.println("Not an Anagram Because length is not same"); } for (int i=0;i< ch1.length;i++) { if (ch1[i]!=ch2[i]) { System.out.println("Not An Anagram"); status=false; break; } } if (status!=true) { System.out.println("It is An Anagram"); } } }
Kth Largest Number in an Array | Java
9:17
B Tech Computer Science
Рет қаралды 6 М.
Check if two strings are anagrams
8:50
Techdose
Рет қаралды 69 М.
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 8 МЛН
Mama vs Son vs Daddy 😭🤣
00:13
DADDYSON SHOW
Рет қаралды 36 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 15 МЛН
Palindrome |  Program to check if a string is Palindrome | Java
9:31
B Tech Computer Science
Рет қаралды 106 М.
Anagram Program in Java Using Strings | Anagram Problem Solution | Interview Questions on Anagram
9:42
ABC - Technology Training & Upskilling
Рет қаралды 85 М.
Check Two Strings are Anagram Or Not using Sort and Equals in Java
11:10
Naveen AutomationLabs
Рет қаралды 25 М.
Check if two strings are anagrams
9:07
CppNuts
Рет қаралды 6 М.
Java Is Better Than Rust
42:14
ThePrimeTime
Рет қаралды 161 М.
I gave 127 interviews. Top 5 Algorithms they asked me.
8:36
Sahil & Sarra
Рет қаралды 628 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 156 М.
Check If Words Are Anagrams | C Programming Example
6:57
Portfolio Courses
Рет қаралды 10 М.
Print Distinct/Unique Values of an Array | Java
9:03
B Tech Computer Science
Рет қаралды 26 М.
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 8 МЛН