Posts

DSA

Image
   DSA (Data Structures and Algorithms) is the study of organizing data efficiently using data structures like arrays, stacks, and trees, paired with step-by-step procedures (or algorithms) to solve problems effectively. Data structures manage how data is stored and accessed, while algorithms focus on processing this data. ========================================================================== Analysis of Algorithms Algorithm analysis is an important part of computational complexity theory, which provides theoretical estimation for the required resources of an algorithm to solve a specific computational problem. How do we compare two order of growths? The following are some standard terms that we must remember for comparison. c < Log Log n < Log n < n 1/3 < n 1/2 < n < n Log n < n 2 < n 2 Log n < n 3 < n 4 < 2 n < n n Here c is a constant To analyze loops for complexity: 1.  Understand the loop bounds Linear loop:   for...