Data Structures : Linked Lists
Chapter 1 :
Introduction to data structures :
Data structure is the most fundamental and building block concept in computer science. Good
knowledge of data structures is a must to design and develop efficient software systems. Data
structures are a way to store and organize data in a computer so that the data can be used efficiently.
Different kinds of structures are needed to organize different kind of data. Now computers work with all
kinds of data. When we study data structures as mathematical or logical models, we just define their
abstract view or in other words, we have a term for this we define them as abstract data types. An
example of an abstract data type can be something called a list that should be able to store a group of
elements of a particular data type. we can implement the same AdT (abstract data types) in multiple
ways in the same language, for example, in C or C++ we can implement. This AdT as a data structure
named linked list. We will be studying all these data structures in the coming lessons and this is all for
this introductory lesson. We will study the cost of these operations, mostly in terms of time and then
definitely. We will study implementation in a programming language, so we will learn the implementation
in programming language.
, Chapter 2 :
Data Structures: List as abstract data type :
List is a common real world entity. list is nothing but a collection of objects of the same type. list should
be able to store a given number of elements of a given data type. the elements are a 0, a 1 and are
accessed something like this and then you can also read elements at a particular position. The features
of my list are that I will call my list empty. If there are no elements in the list. I 'll say the size of the list is
zero. When it is empty, then I can insert an element into the list. I should also be able to specify the
date type for the list. So I should say whether this is a list of integers or string or float. Well, actually we
can implement such a dynamic list using arrays. arrays. it's just that we will have to write some more
operations on top of arrays to provide for all these functionalities. The list in this array is described as
an abstract data type. we have a logic of calling the list empty. When we have this variable end equal to
minus one. we can insert an element at the particular position in the list. After each insertion, the end
will be zero after this one, two, three and so on.
The study of data structures is not just about studying the operations, but also about analyzing the cost
of these operations. access to any element in this dynamic list will take constant time because we have
an array here and in array elements are arranged in one contiguous block of memory using the starting
address or the base address of the block of the memory. inserting an element at the particular position
will be a linear function in terms of the size of the list. removing an element will again be big O(n) time
complexity. time taken for insertion will be proportional to the length of list. This kind of implementation
is not efficient and is of no use for memory.
Chapter 1 :
Introduction to data structures :
Data structure is the most fundamental and building block concept in computer science. Good
knowledge of data structures is a must to design and develop efficient software systems. Data
structures are a way to store and organize data in a computer so that the data can be used efficiently.
Different kinds of structures are needed to organize different kind of data. Now computers work with all
kinds of data. When we study data structures as mathematical or logical models, we just define their
abstract view or in other words, we have a term for this we define them as abstract data types. An
example of an abstract data type can be something called a list that should be able to store a group of
elements of a particular data type. we can implement the same AdT (abstract data types) in multiple
ways in the same language, for example, in C or C++ we can implement. This AdT as a data structure
named linked list. We will be studying all these data structures in the coming lessons and this is all for
this introductory lesson. We will study the cost of these operations, mostly in terms of time and then
definitely. We will study implementation in a programming language, so we will learn the implementation
in programming language.
, Chapter 2 :
Data Structures: List as abstract data type :
List is a common real world entity. list is nothing but a collection of objects of the same type. list should
be able to store a given number of elements of a given data type. the elements are a 0, a 1 and are
accessed something like this and then you can also read elements at a particular position. The features
of my list are that I will call my list empty. If there are no elements in the list. I 'll say the size of the list is
zero. When it is empty, then I can insert an element into the list. I should also be able to specify the
date type for the list. So I should say whether this is a list of integers or string or float. Well, actually we
can implement such a dynamic list using arrays. arrays. it's just that we will have to write some more
operations on top of arrays to provide for all these functionalities. The list in this array is described as
an abstract data type. we have a logic of calling the list empty. When we have this variable end equal to
minus one. we can insert an element at the particular position in the list. After each insertion, the end
will be zero after this one, two, three and so on.
The study of data structures is not just about studying the operations, but also about analyzing the cost
of these operations. access to any element in this dynamic list will take constant time because we have
an array here and in array elements are arranged in one contiguous block of memory using the starting
address or the base address of the block of the memory. inserting an element at the particular position
will be a linear function in terms of the size of the list. removing an element will again be big O(n) time
complexity. time taken for insertion will be proportional to the length of list. This kind of implementation
is not efficient and is of no use for memory.