PRELIM-LESSON 1 Flashcards
the programmatic way of storing data so that data can be used efficiently.
Data Structures
true or false: almost every enterprise application uses various type of structures in one or the other way.
true
systematic way to organize data in order to use it efficiently
data structure
true or false: each data structure has an interface
interface
represent the set of operations that a data structure supports.
interface
only provides the list of supported operations, type of parameters they can accept and return type these operations.
interface
provides the internal representation of a data structure
Implementation
It also provides the definition of the algorithms used in the operations of the data structure.
Implementation
true or false: data structure are used to implement the physical forms of abstract data types.
true
true or false: Data structures are a
crucial part of designing efficient software. They also play a
critical role in algorithm design and how those algorithms are
used within computer programs.
true
examples of how data structures are used:
storing data
managing resources and services
data exchange
ordering and sorting
indexing
searching
scalability
they use algorithms that are tightly coupled with the data structures-such as lists, queues, and mapping from one set of values to another.
software engineers
Data structures are used for efficient data persistence, such
as specifying the collection of attributes and corresponding structures used
to store records in a database management system.
storing data
Core operating system (OS) resources
and services are enabled through the use of data structures such as linked
lists for memory allocation, file directory management and file structure
trees, as well as process scheduling queues.
managing resources and services
Data structures define the organization of information
shared between applications, such as TCP/IP packets
data exchange
Data structures such as binary search trees – also known
as an ordered or sorted binary tree – provide efficient methods of sorting objects,
such as character strings used as tags. With data structures such as priority
queues, programmers can manage items organized according to a specific
priority.
ordering and sorting
Even more sophisticated data structures such as B-trees are used to
index objects, such as those stored in a database.
indexing
Indexes created using binary search trees, B-trees or hash tables
speed the ability to find a specific sought-after item.
searching
Big data applications use data structures for allocating and managing
data storage across distributed storage locations, ensuring scalability and
performance. Certain big data programming environments – such as Apache
Spark – provide data structures that mirror the underlying structure of database
records to simplify querying
scalability
need for data structure
data search
processor speed
multiple request
Consider an inventory of 1 million(106) items of a store. If the
application is to search an item, it has to search an item in 1 million(106) items
every time slowing down the search. As data grows, search will become
slower.
data search
although being very high, falls limited if
the data grows to billion records.
processor speed
As thousands of users can search data simultaneously on
a web server, even the fast server fails while searching the data.
multiple requests
execution time cases
worst case
average case
best case
This is the scenario where a particular data structure operation
takes maximum time it can take. If an operation’s worst case time is ƒ(n) then
this operation will not take more than ƒ(n) time where ƒ(n) represents function
of n.
worst case