➡ Download my DSA with JS E-Book - topmate.io/roadsidecoder/491565 🔴 Complete DSA with Javascript Playlist - th-cam.com/play/PLKhlp2qtUcSZtJefDThsXcsAbRBCSTgW4.html 👤 Join the RoadsideCoder Community Discord - discord.gg/2ecgDwx5EE If this video gets good response, I will make more DSA videos, so do share it with others 🔥
Tq brother for making this DSA playlist , I am literally following every video of yours and started solving leet codes of respective data structure ,initially i felt solving medium level leet codes very tough but later i slowly gaining experience in it and i am building my confidence ,not only now i started following your various playlists 7 month back itself , and i placed in good product based company in JS language ,keep doing like this and be a part of so many youngsters successfull interview journey directly or indirectly
In the context of Data Structures and Algorithms in JavaScript, strings are a fundamental data type used to represent sequences of characters. Strings are commonly used to store and manipulate text-based data in programming. In this explanation, we'll cover some essential string operations and how strings can be used in various algorithms. Creating Strings in JavaScript: In JavaScript, you can create strings using single quotes (''), double quotes ("") or backticks (``). javascript Copy code let str1 = 'Hello, World!'; // Single quotes let str2 = "JavaScript is awesome!"; // Double quotes let str3 = `Using backticks allows for interpolation`; // Backticks Common String Operations: Concatenation: Joining two or more strings together. javascript Copy code let firstName = 'John'; let lastName = 'Doe'; let fullName = firstName + ' ' + lastName; // Concatenating strings console.log(fullName); // Output: "John Doe" Length: Finding the length of a string. javascript Copy code let message = 'Hello, how are you?'; let messageLength = message.length; console.log(messageLength); // Output: 19 Accessing Characters: Accessing individual characters in a string using their index (0-based). javascript Copy code let str = 'JavaScript'; console.log(str[0]); // Output: "J" console.log(str.charAt(1)); // Output: "a" Substring: Extracting a portion of a string. javascript Copy code let str = 'Data Structures and Algorithms'; let substring = str.substring(5, 14); console.log(substring); // Output: "Structures" Searching: Finding the index of a substring within a string. javascript Copy code let message = 'Hello, how are you?'; let indexOfHow = message.indexOf('how'); console.log(indexOfHow); // Output: 7 Replacing: Replacing a substring with another substring. javascript Copy code let str = 'I love JavaScript!'; let newStr = str.replace('JavaScript', 'Python'); console.log(newStr); // Output: "I love Python!" Common String Algorithms: Strings play a crucial role in various algorithms, such as: String Matching Algorithms: Searching for a pattern within a text. String Reversal: Reversing the characters in a string. Anagram Detection: Checking if two strings are anagrams. Palindrome Detection: Determining if a string is a palindrome. String Permutations: Generating all possible permutations of a string. Conclusion: Strings are essential data structures in JavaScript used to store and manipulate text-based data. Understanding common string operations and algorithms will enable you to effectively work with strings and solve problems involving text manipulation. Strings are foundational to many programming tasks, and mastering their use will help you become a proficient JavaScript programmer. Happy coding with strings and algorithms!
hi @RoadsideCoder Can i know the reason why it prints ['some_string' , ;some_more_string', ''] ...values . Like i wanna know why it adds empty string '' to end of array , even if it doesnt exist [ Timeline 6 mins , start of video ]
Bro... 🙏 i want to learn DSA suggest me the which website is best n also show approaching strategy.. Im from telangana. Ur teaching attracted me to write this
/** * @param {number} x * @param {number} y * @return {number} */ var hammingDistance = function (x, y) { let myX = x.toString(2); let myY = y.toString(2); if (myX.length > myY.length) { myY = myY.padStart(myX.length, 0) } else { myX = myX.padStart(myY.length, 0); } let count = 0; for (let i = 0; i < myX.length; i++) { if (myX[i] !== myY[i]) count++; } return count; };
➡ Download my DSA with JS E-Book - topmate.io/roadsidecoder/491565
🔴 Complete DSA with Javascript Playlist - th-cam.com/play/PLKhlp2qtUcSZtJefDThsXcsAbRBCSTgW4.html
👤 Join the RoadsideCoder Community Discord - discord.gg/2ecgDwx5EE
If this video gets good response, I will make more DSA videos, so do share it with others 🔥
Please bhaiya complete asap dsa series for forntend developer requirement. And interview dsa questions playlist .
Tq brother for making this DSA playlist , I am literally following every video of yours and started solving leet codes of respective data structure ,initially i felt solving medium level leet codes very tough but later i slowly gaining experience in it and i am building my confidence ,not only now i started following your various playlists 7 month back itself , and i placed in good product based company in JS language ,keep doing like this and be a part of so many youngsters successfull interview journey directly or indirectly
Bro your course is ultimate
you have the best time complexity among all youtubers 😅.
You cover all these where others would take 2-3 hrs
you are savior dude
In the context of Data Structures and Algorithms in JavaScript, strings are a fundamental data type used to represent sequences of characters. Strings are commonly used to store and manipulate text-based data in programming. In this explanation, we'll cover some essential string operations and how strings can be used in various algorithms.
Creating Strings in JavaScript:
In JavaScript, you can create strings using single quotes (''), double quotes ("") or backticks (``).
javascript
Copy code
let str1 = 'Hello, World!'; // Single quotes
let str2 = "JavaScript is awesome!"; // Double quotes
let str3 = `Using backticks allows for interpolation`; // Backticks
Common String Operations:
Concatenation: Joining two or more strings together.
javascript
Copy code
let firstName = 'John';
let lastName = 'Doe';
let fullName = firstName + ' ' + lastName; // Concatenating strings
console.log(fullName); // Output: "John Doe"
Length: Finding the length of a string.
javascript
Copy code
let message = 'Hello, how are you?';
let messageLength = message.length;
console.log(messageLength); // Output: 19
Accessing Characters: Accessing individual characters in a string using their index (0-based).
javascript
Copy code
let str = 'JavaScript';
console.log(str[0]); // Output: "J"
console.log(str.charAt(1)); // Output: "a"
Substring: Extracting a portion of a string.
javascript
Copy code
let str = 'Data Structures and Algorithms';
let substring = str.substring(5, 14);
console.log(substring); // Output: "Structures"
Searching: Finding the index of a substring within a string.
javascript
Copy code
let message = 'Hello, how are you?';
let indexOfHow = message.indexOf('how');
console.log(indexOfHow); // Output: 7
Replacing: Replacing a substring with another substring.
javascript
Copy code
let str = 'I love JavaScript!';
let newStr = str.replace('JavaScript', 'Python');
console.log(newStr); // Output: "I love Python!"
Common String Algorithms:
Strings play a crucial role in various algorithms, such as:
String Matching Algorithms: Searching for a pattern within a text.
String Reversal: Reversing the characters in a string.
Anagram Detection: Checking if two strings are anagrams.
Palindrome Detection: Determining if a string is a palindrome.
String Permutations: Generating all possible permutations of a string.
Conclusion:
Strings are essential data structures in JavaScript used to store and manipulate text-based data. Understanding common string operations and algorithms will enable you to effectively work with strings and solve problems involving text manipulation. Strings are foundational to many programming tasks, and mastering their use will help you become a proficient JavaScript programmer. Happy coding with strings and algorithms!
Plz upload next Videos & plz complete this series...
Would be good if you add content about the object interview questions and also in the paid question course for practice.
check here - th-cam.com/play/PLKhlp2qtUcSaCVJEt4ogEFs6I41pNnMU5.html
Bro when can we expect to have full series for this???
Have u solved atleast 10 questions on leetcode for each topic that i have discussed until now? Because Practice is more important than watching videos
@@RoadsideCoderyeah doing it.
Link list , Graph or tree ki videos kab aa rahi hai
Can u please explain the TC ans SC as well. Btw thanks for the video 😁
hi @RoadsideCoder Can i know the reason why it prints ['some_string' , ;some_more_string', ''] ...values . Like i wanna know why it adds empty string '' to end of array , even if it doesnt exist
[ Timeline 6 mins , start of video ]
please tell me when you upload the next video i'm really waiting for it🙂
I want you to make all topics in depth in Js please
I have created a JS Playlist seaparately - th-cam.com/play/PLKhlp2qtUcSaCVJEt4ogEFs6I41pNnMU5.html
i will.
Bro... 🙏 i want to learn DSA suggest me the which website is best n also show approaching strategy.. Im from telangana. Ur teaching attracted me to write this
👍🙏
❤
❣
When I try to input 01 in function argument it still show true . Why is it ? It should be false because 01 !=10
sir please hindi me explain kre to jyda better hota i like ur content but language should be hindi
Interview me hindi bologe?
/**
* @param {number} x
* @param {number} y
* @return {number}
*/
var hammingDistance = function (x, y) {
let myX = x.toString(2);
let myY = y.toString(2);
if (myX.length > myY.length) {
myY = myY.padStart(myX.length, 0)
} else {
myX = myX.padStart(myY.length, 0);
}
let count = 0;
for (let i = 0; i < myX.length; i++) {
if (myX[i] !== myY[i]) count++;
}
return count;
};
Cant understand a shit on Hamming Distance
❤