COP4538

26 Karteikartenvon Allixar
Diese Karteikarten lernenKostenlos · Spaced Repetition · iPhone, Android, Mac & Web

Alle Karten

1
Quicksort Best and Average Runtime Complexity
O(NlogN)
2
What is Data Structures?
Organizing, Storing, and Performing Operations on Data
3
Stack: Push and Pop
Push / append() : Add the integer to the top
Pop / pop(: Remove from the top
Read the table number from top to bottom
4
s.push(5)
s.push(1)
s.push(4)
s.pop()
s.push(2)
s.pop()
s.push(8)
s.push(7)
s.pop()
s.push(3)
3
8
1
5
5
Python Reversing The String Code:
def reverse_string(s):
reversed_string = ""
stack = [] # Initialize an empty stack
# 1. Push each character onto the stack
for char in s:
stack.append(char)
# 2. Pop from the stack and build reversed string
while len(stack) != 0:
reversed_string += stack.pop()
return reversed_string

string_to_reverse = "hello world"

reversed_string = reverse_string(string_to_reverse)

print(reversed_string)
6
In an AVL tree of height 6, what is the maximum nodes?
127
7
In an AVL tree of height 6, what is the minimum nodes?
33
8
Binary Tree Traversals: Pre-Order
Root -> Left -> Right
9
Binary Tree Traversals: In-Order
Left -> Root -> Right
10
Binary Tree Traversals: Post-Order
Left -> Right -> Root
11
What is a record?

Data Structures that stores subitems, fields, with a name associated with each subitem
12
What is an array list []
Mutable or Changeable Data structure that stores an ordered list of items, where each item is directly accessible by a positional index
13
What is a linked list?
data structure that stores an ordered list of items in nodes, where each node stores data and has a pointer to the next node.
14
what is a hash table?
data structure that stores unordered items by mapping (or hashing) each item to a location in an array.
15
A linked list stores items in an unspecified order.
  • True
  • False
16
A node in binary tree can have zero, one, or two children.
  • True
  • False
17
A list node's data can store a record with multiple subitems.
  • True
  • False
18
Items stored in an array can be accessed using a positional index.
  • True
  • False
19
What is an algorithm?

Describes a sequence of steps to solve a computational problem or perform a calculation
20
What is computational problem?
Specifies an input, a question about the input that can be answered using a computer, and the desired output.
21
Do two student essays share a common phrase consisting of a sequence of more than 100 letters?
Longest Common Substring
22
A remove operation for a list ADT removes the specified item. Given a list with contents: 2, 20, 30, what is the list after the following operation?
Remove(list, item 2)
20, 30
23
Priority Queue
Items are ordered based on items' priority. Duplicate items are allowed.
24
F(N) = (2^N)
O(N)
25
F(N) = N^1/2 + LogN
O(N^1/2)
26
F(N) = (N N N * N)^3
O(N)^12
Alle 26 Karten kostenlos lernen

Mehr Karteikarten: Informatik

Database (updated 2 )35 KartenInformatik · EnglischFaizahMixed Signals Prelim Drei Yu30 KartenInformatik · EnglischDiandreiSorting Algorithms22 KartenInformatik · EnglischMariaIST 6645 Decks · 65 KartenInformatikPunIB Compsci Topic 213 KartenInformatik · EnglischnoahmzD334 - Introduction to Cryptography165 KartenInformatik · EnglischJoshuaSecurity+ SY0-701129 KartenInformatik · EnglischErickComputer Architecture and Hardware (CS008)94 KartenInformatik · EnglischJulieSoftware Development 2: Sociotechnical Systems73 KartenInformatik · EnglischEdsonTotale kostprijs van een aankoop61 KartenInformatik · NiederländischYaniRepublic Act No. 10175 (Cybercrime Prevention Act of 2012)50 KartenInformatik · EnglischSANGALLAPython42 KartenInformatik · Englisch—Griffith—

Alle Decks: Informatik

Lerne diese Decks in der App

Kostenlos auf iPhone, Android, Mac und im Web. Füge jedes Deck mit einem Tipp zu deinem Konto hinzu.

Laden im App StoreJetzt bei Google Play
Alle 26 Karten kostenlos lernen