DSA-in-December

āœØ š——š—®š˜† 2: š—”š—暝—暝—®š˜†, šŸ®š—— š—”š—暝—暝—®š˜†, š— š˜‚š—¹š˜š—¶š—±š—¶š—ŗš—²š—»š˜€š—¶š—¼š—»š—®š—¹-š—”š—暝—暝—®š˜†āœØ

šŸ“Œ What are arrays? In cases where there is a need to use several variables of same type, for storing, example, names or marks of ā€˜nā€™ students we use a data structure called arrays. Arrays are basically collection of elements having same name and same data type. Using arrays, saves us from the time and effort required to declare each of the element of array individually. Creating an array The syntax for declaring an array is: Data_type array_name [ array_size ] ; Example : float marks[5]; Here, we declared an array, marks, of floating-point type and size 5. Meaning, it can hold 5 floating-point values. Similarly, we can declare array of type int as follows: int age[10]; How are arrays stored? The elements of arrays are stored contiguously, i.e., at consecutive memory locations. The name of the array actually has the address of the first element of the array. Hence making it possible to access any element of the array using the starting address. Example: int age[ ] = {10, 14, 16, 18, 19};

āœļø š—™š—¼š—æ š—Æš—²š˜š˜š—²š—æ š˜‚š—»š—±š—²š—暝˜€š˜š—®š—»š—±š—¶š—»š—“ š—暝—²š—³š—²š—æ š—³š—¼š—¹š—¹š—¼š˜„š—¶š—»š—“ š—®š—暝˜š—¶š—°š—¹š—²š˜€ ;

  1. https://www.geeksforgeeks.org/array-data-structure/ 2)https://www.tutorialspoint.com/data_structures_algorithms/array_data_structure.htm 3)https://www.w3schools.in/data-structures/data-structures-arrays 4)https://www.simplilearn.com/tutorials/data-structure-tutorial/two-dimensional-arrays 5)https://www.geeksforgeeks.org/multidimensional-arrays-c-cpp/

šŸ“½ļø š—§š˜‚š˜š—¼š—暝—¶š—®š—¹ š—Ÿš—¶š—»š—øš˜€;

  1. https://youtu.be/PyTK_g1l8V8
  2. https://youtu.be/bR0NYdmMg94
  3. https://youtu.be/NTHVTY6w2Co
  4. https://youtu.be/6a39OjkCN5I 5)https://youtu.be/18Zt5I4S45o 6)https://youtu.be/Xx1tWbb37hY 7)https://youtu.be/CfqjAKN-AwI

šŸ‘Øā€šŸ’» š—¤š˜‚š—²š˜€š˜š—¶š—¼š—»š—¶š—»š—“ š—„š—¼š˜‚š—»š—± :

ā˜… šŸ² š—½š—暝—¼š—“š—暝—®š—ŗš—ŗš—¶š—»š—“ š—¾š˜‚š—²š˜€š˜š—¶š—¼š—»š˜€ ā˜…

š—”š—暝—暝—®š˜†

  1. https://leetcode.com/problems/sum-of-all-odd-length-subarrays/
  2. https://leetcode.com/problems/check-if-two-string-arrays-are-equivalent/

šŸ®š—— š—”š—暝—暝—®š˜†

  1. https://leetcode.com/problems/convert-1d-array-into-2d-array/
  2. https://leetcode.com/problems/richest-customer-wealth/

š— š˜‚š—¹š˜š—¶š—±š—¶š—ŗš—²š—»š˜š—¶š—¼š—»š—®š—¹ š—”š—暝—暝—®š˜† 1)https://www.hackerearth.com/practice/data-structures/arrays/multi-dimensional/practice-problems/algorithm/gift-for-almas-3-33d2f7c7/ 2)https://www.hackerearth.com/practice/data-structures/arrays/multi-dimensional/practice-problems/algorithm/binary-blocks-4b173d4a/