Data Structures - Definition & Examples - Algorithm Class 9 Maths - Data Structures

part 2 - Data Structures - Data Structures - Chapter 11 Class 9 - The World of Algorithms (Ganita Manjari) - Maths Class 9

part 3 - Data Structures - Data Structures - Chapter 11 Class 9 - The World of Algorithms (Ganita Manjari) - Maths Class 9

Remove Ads
Teachoo · Class 9 Explore Class 9

Transcript

Data Structures While executing the GCD algorithm, we need to keep several pieces of information: For gcd (m, n) Giving these values names allows us to refer to them precisely. For example: Name | What it stores m | First input number n | Second input number x | Divisor currently being examined divisors-of-m | List of Divisors of the first number divisors-of-n | List of Divisors of the second number common-divisors | List of Divisors found in both lists “For each x in divisors-of-m…” is much clearer than repeatedly saying: “Take the next number from the collection of factors of the first input…” What is a data structure? A data structure is a way of organising information so that an algorithm can store and use it. A list is one example. For instance: [1, 3, 5, 15, 25, 75] stores several numbers in a particular order. Why does the organisation matter? Compare these lists: A = [1, 3, 5, 15, 25, 75] B = [25, 1, 75, 5, 15, 3] They contain the same numbers. But: In A, the last entry is greatest because the list is increasing. In B, the last entry is 3, so we cannot use that shortcut. The way information is organised can make an operation simpler (Or it can make an assumed shortcut incorrect)

CA Maninder Singh's photo - Co-founder, Teachoo

Made by

CA Maninder Singh

CA Maninder Singh is a Chartered Accountant qualified since 2010 and an educator teaching since 2006. At Teachoo, he draws on his accounting and tax experience to explain Accounts, Income Tax and GST through step-by-step lessons and practical examples.

For an uninterrupted learning experience, students can use Teachoo Black to remove ads and focus better.