Prelim Flashcards
is a way to store data
data structure
give us the possibility to manage large amounts of data efficiently for uses such as large databases and internet indexing services
Data structures
are essential ingredients in creating fast and powerful algorithms. They help in managing and organizing data, reduce complexity, and increase efficiency
Data structures
are basic data structures provided by programming languages to represent single values, such as integers, floating-point numbers, characters, and booleans.
Primitive Data Structures
In Computer Science there are two different kinds of data structures.
- Primitive Data Structures
- Abstract Data Structures
is a set of step-by-step instructions to solve a given problem or achieve a specific goal.
(cooking recipe)
algorithm
are higher-level data structures that are built using primitive data types and provide more complex and specialized operations.
Some common examples include arrays, linked lists, stacks, queues, trees, and graphs
Abstract Data Structures
are fundamental to computer programming as they provide step-by-step instructions for executing tasks
Algorithms
is about finding efficient ways to store and retrieve data, to perform operations on data, and to solve specific problems
Data structures and algorithms (DSA)
are used in virtually every software system, from operating systems to web applications:
- for managing large amounts of data, such as in a social network or a search engine
- for scheduling tasks, to decide which task a computer should do first
- for planning routes, like in a GPS system to find the shortest path from A to B
Data structures and algorithms (DSA)
are the data structures that are used to store multiple items.
They both support the indexing of elements to access them, slicing, and iterating over the elements
lists and arrays
Accessing element is fast
they are in a contiguous manner but insertion and deletion is quite expensive because all the elements are shifted from the position of inserting and deleting element linearly.
Python Arrays
is actually a dynamic array .
Inserting or deleting elements at the beginning or in the middle of a list can be less efficient because it may require shifting all subsequent elements, which is a linear-time operation in the worst case
List
is an inbuilt collection of items that can contain elements of multiple data types, which may be either numeric, character logical values, etc.
It is an ordered collection supporting negative indexing.
can be easily merged and copied using Python’s inbuilt functions
Lists
is a vector containing homogeneous elements i.e. belonging to the same data type
Array