2. Who is the Speaker ?
Hello, I am currently a sophomore here at
symbiosis institute of technology,
I am just another geeky guy, who is into
development, blogging, music, basketball,
swimming. But most importantly into community
building
3. What do you mean by data
structures?
Memory representation of
Data Structures
02INTRODUCTION MEMORY PRESENTATION
01
SUMMING UP THE
PRESENTATION
CONCLUSION
04TYPES OF DATA STRUCTURES
A BRIEF SUMMARY
03
7. For example
1..You can either Store data in tuple or list ,
2..You can either use store data in Stack and
Queue..
Data structure refers to
methods of organizing units of
data within larger data sets.
10. A Byte at a time !
It has proved difficult to develop devices that can understand natural
language directly due to the complexity of natural languages. However,
it is easier to construct electric circuits based on the binary or ON and
OFF logic.
● Bits: can be defined as either a binary, which can be 0, or 1.It is the
basic unit of data or information in digital computers.
● Byte: a group of bits (8 bits) used to represent a character. A byte is
considered as the basic unit of measuring memory size in computer.
● A nibble: is half a byte, which is usually a grouping of 4 bits.
11.
12. How does Memory look like ?
You can think ram as a box ,divided into smaller cells ,each cell holds equal data .
When you store data in a variable it gets converted into byte's , and each byte =8
bits , each block can hold 4 bits .
For example : When you write int a =2 , a gets stored with binary value of 2
=0000 0010 , first four bits are stored in one cell and other four bits in next
adjacent cell.
14. A typical memory representation of C program consists of following
sections.
15. 1. Text Segment:
It is one of the sections of a program in an object file or in memory, which contains
executable instructions.
2. Initialized Data Segment:
It contains the global variables and static variables that are initialized by the programmer.
3. Uninitialized Data Segment:
Data in this segment is initialized by the kernel to arithmetic 0 before the program starts
executing
4.Stack:it's where some of your processor's information gets saved, for ex: functions,
structures etc.
5.Heap: Used to allocate big data of memory, this is what we call Dynamic Memory. This
memory is managed by the programmer. for ex: Class
18. Linear - Static Data Structures
1.Fast access to elements
2.Have fixed maximum size
3.Memory is reserved at the time of compilation.
Eg: Arrays, Records
21. linear - Dynamic Data Structures
1.Fast insertion/deletion of element
2.Have flexible size
3.Memory allocation for the data structure takes place at the runtime, only required amount
of memory is allocated.
Eg: Link lists, Stacks & Queues.
22. Stack (LIFO)
Now stack works on the concept of LIFO , which means last element in will be the first
element out . For only understanding purpose we take stack to be horizontal ,
For our conceptual understanding consider a stack of plates example , you have to put plate
one after another and can only take the top most plate out .
23. Queue (FIFO)
Now Queue works on the concept of first element entered will be first element pushed , for
conceptual reasons we use queue to be Vertical,
Now Queue works on the concept of first element pushed will be last element to be first out
, for conceptual reasons we use queue to be Vertical,
24. linked list may be defined if all the block are linked to each other ,using address of
other blocks . It’s different from an array , as an array is a collection of simultaneous
boxes , where as list is collection of boxes which are connected by a conceptual string
.
Linked list
26. Non linear
The data structure where data items are not organized sequentially is called non linear
data structure. In other words, A data elements of the non linear data structure could be
connected to more than one elements to reflect a special relationship among them. All the
data elements in non linear data structure can not be traversed in single run.
27. Trees
A tree is a finite set of nodes with one specially designated node called the root and the
remaining notes are partitioned into n>=0 disjoint sets T1 and Tn where each of those sets is a
tree, T1 to Tn are called the sub trees of the root.
Here A is the root and other characters are each of the sets or nodes or sub trees of the root. A
simple understanding of root would be like head pointer in link list ,It holds the very initial
address of the Data Structure .
30. Graph
A Graph is a non-linear data structure consisting of nodes and edges. The nodes are sometimes
also referred to as vertices and the edges are lines or arcs that connect any two nodes in the
graph.
A graph data structure (V, E) consists of:
1. A collection of vertices (V) or nodes.
2. A collection of edges (E) or paths.
32. Graph data structures are said to contain graph data, often stored in graph databases.
Graph data tends towards intricate connections with high-value relationships. They are
implemented in Google maps, Facebook’s Friend suggestion algorithm these two are
the prominent examples.
35. THANKS!
To contact me reach out on
1.
https://twitter.com/hridyesh_bi
sht.
2.
https://www.linkedin.com/in/h
ridyesh-bisht-223406133/
3.
https://programmerprodigy.code.blog/
4
.hridyesh.bisht.btech2018@sitpune.edu.in
Editor's Notes
Good afternoon guys, I am hridyesh singh bisht, So we will try to get a byte of Data Structures in this seminar.
No worries if you didn’t get the pun there, you will get it eventually. Remember bit by bit we can progress.
Who am I ?
The topics we will be covering in today’s session
What is an algorithm ?
Now according to wikipedia an Algorithm is a set of instructions that defines not just what needs to be done but how to do it.
Let me explain with the help of a flow chart and a cake
1.Explain data structure
2.Difference between tuple and list
Okay so you won’t generally have such amazing use cases to help you, let me give you a real life example. If i tell you to make a grocery list, there are multiple ways people can do this
1.Alphabetically 2.Priority 3.Random , There can be various ways to organise your data.
Now how is data stored in memory ?, So, Back in early days when programming was still being developed, guys were thinking how can we make a machine understand natural language as most languages are complex, So as rick sanchez said everything is Uncertainty is inherently unsustainable .Eventually, everything either is or isn't. So these guys went with true or false, 0 or 1. Consider the example of a switch
Okay so let me explain you a bit, a nibble and a byte.
Ram as a box, with division into small equal cells.When ever you store data in the computer it gets converted to machine language or 0 and 1,
Lets take an exaple of int a =2, so binary value of 2 is 0000 0010, so if each block stores a nibble then we will require two cells to store this value.
Imagine this shelf as a box and each compartment as a cell, each cell can hold four bits or nibble.
Kernel space is occupied by OS, Like Windows or ubuntu, that space is occupied to provide basic functionality of the OS
What is linear data Structure ?
what is array ?
Array always index always starts at 0
I could have gone with a better implementation but i was hungry so, any linear storage implementation can be considered as an array
Now how can you plot elements in an array ?, let us take example of int a[1,2,3,4,5,6,7,7,7] .
Linear Dynamic Data Structures
A Line of people trying to get something, the size is variable you can’t predict the size of the data.
What is Stack ?
An example of plates
The actual representation of Stack
What is queue ?
An example of line
The actual representation of Queue
What is Linked list ?
The use of pointers in linked list
An example of linked list
Actual memory representation difference between array and linked list, Use value of 65.
What is Non- Linear data structure ?
basically connected to more than one elements to reflect a specail relationship among them
What is a tree ?
What is subtree ?
What is a root node ?
What is Root Node ? What is Parent Node, child Node ?
What are siblings, leaf Node also Sub tree ?
A directory System in your Computer System.
What is Graph ?
Vertices and edges ?
An example of a graph ?
Now the Structure of a Graph ?
An example will be Facebook friend suggestion algorithm, let’s call the center lady linda her friend karen and the guy as kyle.
Google maps as it has to take a lot of relations into considerations for it to form a path from Point A to E.
Now The question why do we need data structure and algorithm ?
If you think in small scale optimizing a process in your code by few seconds won’t affect you that much but try considering a large code with a lot of processes, even if we can optimize 10 seconds in 100 process, 10 * 100 =1000 seconds saved in total, this was still a small example
Any Questions ?
Useful Links and ppt will be provided to you, for any further questions reach me out on the following plat forms