Data Flashcards
- Data is classified into ? Sych as?
- This has domain of allowed valued n set of OPERATION has categ of PRINITIVE N ADT
- Data is classified into DATA TYPES , as char, float, int
- Data Types
- Primitive is aka as ?
- ?? How data can be stored in diff STRUCTURES
- ?? Helps us how to solve diff problems by searching thru n manipulating data , provides step by step instructions to achieve goal
- simple or Atomic data types
- Data Structures
- Algorithmns
- A data struc by prog lang to repre single values ( INT, FLOAT CHAR BOOLEANS)
- A data struc BUILT USING PRIMITIVE DATA TYPES N MORE COMPLex ( linked list, stacks, trees)
- Way of organizing data pra efficiently
- Measure of amt of time an algo takes to run,
- Measure of d amt of MEMORY an algo uses
1.Primitive Data types
2. Abstract Data Type
3. Data structures
4. Time complexity
5. Space Cimplexity
- where a funct call itself
- a mathe. nota. describ. the limiting behavior of a function’
- A methpd of solving complex prob by BREAKING THEM in smaller sub-problems
- simple and straight forward way an algorithm can work by simply trying all possible solutions and then choosing the best one.
1.Recursion
2.2. Big O
3.divide n Conquer
4.4. brute force
- fibonacci numbers r always named after an ??? in a ???? century
- how to find the nth fibo numer using recursion?
- italian, 13th
- n = F(n-1)+f(n-2)
- a data struct to STORE MULTIPLE elements
- You cannot resize an
array. t?F - Multidimensional arrays are implemented
as arrays of arrays
4.Algorithms are expressed in pseudo-code
- Array
- T
- t
- T
1/ recursion has 2 parts
2. What is a smaller identical problem(s)?
3. 2. ow are the answers to smaller problems combined to
form the answer to the larger problem
3 the smallest problem that can be solved easily
(without further decomposition)?
1.1 Base case// stopping condition
1.2 Recursive call// call itself w diff arguments, reduces complexity of the problem
2. Decomposition
3. Compositioin
4. base case
- a** linear data struc** insertions n deletions r allowed ONLY AT THE END , LIFO
- this adds an element to the top of the stack
- Removes top elemen from stakc
- Checks if stack is empty
- ReTURNS THE TOP ELE WITHOUT REMOVING
- check is stack is full
- Stack
- Push
- Pop
- isEmpty
- Peek
- IfFull
1.The items are popped in the reversed order in which they are pushed. If the stack is empty, then it is said to be an Underflow condition.
2.s used to return the count of elements that are present inside the stack.
3.Block Delimiters are example 3
- .size
- begin/end, parenthesis, braces
1.a linear data structure that follows the First-In-First-Out (FIFO) principle. It operates like a line where elements are added at one end (rear) and removed from the other end (front).
2.adds an elem in end/rear of queue
3. removes and returns the element
4.
- queu (ex one way exits
Queue of ticket
Printing queue
) - enqueu(insert
- dequeu (delete)
appplication of stacks, notation
- a + B , between operand
- before operand, +AB
- after operand, AB+
- after all charc from infix exper, POP any remaining OPERATORYS in the stack to the postfix operators
- INFIX NNOTATION
- PREFIX NOTATION
- postfix notation
1 linear data structure that consists of a series of nodes connected by pointers
2. collect of node contains a** data field and a reference** (link) to the
next node in the sequence.
● Navigation is forward only
- this holds actual value /data w the node
- Stores the memory address of the next node
- ead and Tail: The linked list is accessed through the head node, which points to the first node in the list. The last node in the list points to NULL or nullptr, indicating the end of the list. This node is known as the tail node.
we. prefer linked list over arrays is due to ease of insertion and deletion in linked list
- Linke dlist
- Single linked list
- Node
- Next Pointer/reference
- here we discuss the amount of resources that an algorithm needs to execute, or more precisely, its efficiency.
- Input case, best case sa una (1-99=1)
- input case, most common
- overall anyslis
- Comutational Complexity
- worst case (kuha dulo, 99
- Average anyslis, in between or /2
- this notation is used 2 repre complexities of algo
- Bid O is also?
- this identifies the data being requested by the user list
- this is the most basic algorithm & 2
- list beging n continues untol d iterm is found/searched
- asymptotic notation
- Big Order, 1-this drops constant facorts, 2 lower orderterns
3/ Search key
4. Sequential Seach / linearsearch