Mastering 1D Arrays in JavaScript | DSA in Javascript | Vishwa Mohan

preview_player
Показать описание
In this video, we explore mastering 1-dimensional arrays, covering their uses, methods, and real-world applications. Whether you're a beginner or brushing up on your skills, this tutorial will provide you with a solid understanding of how to work with arrays efficiently in JS.
Learn how to perform essential operations like adding, removing, searching, and manipulating data in arrays. Enhance your JavaScript knowledge and boost your coding confidence with practical examples and clear explanations!

What you'll learn:

Introduction to 1D arrays in JavaScript
Array methods: push(), pop(), shift(), unshift(), and more
How to loop through arrays efficiently
Tips and tricks for working with arrays in JavaScript

Timestamp:

00:04 Introduction to linear and nonlinear data structures in DSA
02:30 Importance of mastering 1D arrays in JavaScript
08:03 Mastering 1D Arrays in JavaScript
11:03 JavaScript arrays are indexed starting from 0 and can be modified easily
16:42 Understanding 1D arrays in JavaScript
19:12 JavaScript arrays have unique features compared to other programming languages.
24:13 JavaScript arrays support empty slots
26:30 JavaScript arrays do not always store elements in a continuous memory location
31:38 Storing array elements in continuous locations brings speed advantages
33:53 Use arrays in JavaScript to store only one type of data for fastest read and write operations
38:36 Creating a function to find the max index of an array
40:49 Understanding index value updates in JavaScript arrays
45:29 The function 'isSorted' checks if an array is sorted or not
47:52 Understanding array manipulation for sorting and reversing
52:56 Manipulating 1D arrays in JavaScript using indices and looping
54:49 Using the two pointer approach to optimize code for space complexity
59:04 Explanation on how to correct positions of elements in JavaScript arrays
1:01:15 Optimal approach is key in DSA
1:06:39 Swapping values to transform the array
1:08:51 Understanding array manipulation in JavaScript
1:13:09 Finding indexes of two numbers that add up to a specific target in a sorted array.
1:15:18 Using two-pointer approach to solve the problem.
1:20:08 Time complexity is n², which is also called as Brute Force approach.
1:22:20 Manipulating pointers in sorted arrays
1:27:13 Explaining the process of finding a target sum in JavaScript arrays
1:29:33 Solving 1D array problem using JavaScript
1:34:20 Calculating maximum water stored between different wall heights
1:36:42 Finding combinations of walls for water storage in a brute force approach
1:41:09 Using the two pointer approach for finding maximum area
1:43:44 Maximizing area calculation with left and right pointers
1:49:12 Exploring height comparisons for maximizing area
1:51:57 Identifying and resolving a coding challenge related to returning max area
1:56:52 Removing duplicates and counting unique elements in an array
1:59:34 Reordering and sorting elements in an array in JavaScript

Join our WhatsApp Community for resources, practice questions, and all important announcements!
Рекомендации по теме
Комментарии
Автор

sir pls continue the series there are many student who learn dsa in js but there is not too good resources. yours teaching style is excellent sir ❤❤❤❤

shivamsrivastava
Автор

Sir when oops part in java going to stream ?? Tomorrow

DhanushDommata
Автор

Sir, if you launch this course in Hindi, it will be a huge success because nowadays, people who want to pursue web development or full-stack blockchain prefer to learn DSA in JavaScript instead of C++ or Java. Many of my friends are also looking for DSA resources in JavaScript, but the existing ones aren't very good. Just like me and my friends, many students face the same problem. If you can address this gap, there’s a high chance that your channel will gain a lot of popularity

and also thanks for this amazing lecture

nithenbains
Автор

Solution for unique elements in an array (just for reference)






const unique = (arr) => {
let i = 0;
for (let j = i; j < arr.length; j++) {
if (arr[i] !== arr[j]) {
i++;
arr[i] = arr[j];
}
}
return i + 1;
};

console.log(unique([0, 0, 1, 1, 1, 2, 2, 3, 3, 4]));

vikaspattar
Автор

00:04 Introduction to linear and nonlinear data structures in DSA
02:30 Importance of mastering 1D arrays in JavaScript
08:03 Mastering 1D Arrays in JavaScript
11:03 JavaScript arrays are indexed starting from 0 and can be modified easily
16:42 Understanding 1D arrays in JavaScript
19:12 JavaScript arrays have unique features compared to other programming languages.
24:13 JavaScript arrays support empty slots
26:30 JavaScript arrays do not always store elements in a continuous memory location
31:38 Storing array elements in continuous locations brings speed advantages
33:53 Use arrays in JavaScript to store only one type of data for fastest read and write operations
38:36 Creating a function to find the max index of an array
40:49 Understanding index value updates in JavaScript arrays
45:29 The function 'isSorted' checks if an array is sorted or not
47:52 Understanding array manipulation for sorting and reversing
52:56 Manipulating 1D arrays in JavaScript using indices and looping
54:49 Using the two pointer approach to optimize code for space complexity
59:04 Explanation on how to correct positions of elements in JavaScript arrays
1:01:15 Optimal approach is key in DSA
1:06:39 Swapping values to transform the array
1:08:51 Understanding array manipulation in JavaScript
1:13:09 Finding indexes of two numbers that add up to a specific target in a sorted array.
1:15:18 Using two-pointer approach to solve the problem.
1:20:08 Time complexity is n², which is also called as Brute Force approach.
1:22:20 Manipulating pointers in sorted arrays
1:27:13 Explaining the process of finding a target sum in JavaScript arrays
1:29:33 Solving 1D array problem using JavaScript
1:34:20 Calculating maximum water stored between different wall heights
1:36:42 Finding combinations of walls for water storage in a brute force approach
1:41:09 Using the two pointer approach for finding maximum area
1:43:44 Maximizing area calculation with left and right pointers
1:49:12 Exploring height comparisons for maximizing area
1:51:57 Identifying and resolving a coding challenge related to returning max area
1:56:52 Removing duplicates and counting unique elements in an array
1:59:34 Reordering and sorting elements in an array in JavaScript

Sourabhwastaken