Software Engineering Flashcards

(36 cards)

1
Q

Big o notation for 000.5n^3

A

n^3 we ignore all smaller terms, do some big O exampels

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

BIG 0 order

A

2^N>n^3>N^2logn>N^2>NlogN>n>1(constant)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Big O, O(x+Y)

A

the greater of x or y

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Big) (XY)

A

OxOy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Bubble sort

A

start at index o
compare with item next to you. if its less than you, swap,
incriment.

repeat whole list until there are no swaps

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

total passes for bubble sort of n length

A

n(n-1)/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

bubble sort time

A

best O(n)
avg n^2
worst n^2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Insertion sort

A

assume first item is sorted.
place the next item in the correct spot for the sorted section.
increase the sorted seciton

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

total passes for insertion sort

A

n-1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

insertion sort time

A

best n
worst n^2
avg n^2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

selection sort

A

The selection sort algorithm sorts an array by repeatedly finding the minimum element (considering ascending order) from unsorted part and putting it at the beginning. The algorithm maintains two subarrays in a given array.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

seleciton sort time

A

n^2 all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

merge sort

A

Find the middle point to divide the array into two halves:
middle m = (l+r)/2
2. Call mergeSort for first half:
Call mergeSort(arr, l, m)
3. Call mergeSort for second half:
Call mergeSort(arr, m+1, r)
4. Merge the two halves sorted in step 2 and 3:
Call merge(arr, l, m, r)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

merge sort timing

A

nlogn for all

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Pivot sort

A

Pick a “pivot”

  1. Divide into less-than & greater-than pivot
  2. Sort each side recursively
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Binary search

A

Binary search is an efficient algorithm for finding an item from a sorted list of items. It works by repeatedly dividing in half the portion of the list that could contain the item, until you’ve narrowed down the possible locations to just one

17
Q

benefits of linked lists

A

no needed size, dynamic, timing is all On but o1 for insert at end

GO OVER CREATION AND ALGORITHM STUFF

18
Q

adding data to stack

A

Go over stack stuff

push and pop affect stuff on top only

19
Q

enqueue

A

getting into the queue

20
Q

dequeue

A

gettingout of the querye, have been served

21
Q

peek

A

The peek() method of Queue Interface returns the element at the front the container. It does not deletes the element in the container.

22
Q

queue follows

23
Q

in order tree traversal

A

visit left subtree, then root then right

24
Q

pre order tree traversal

A

visit current node, then left, then right

25
post order tree traversal
traverse left, then right then root.
26
BFS
used for traversing a graphs by visiting all unvisited nodes adjacent to start. then repeating for the adjacent nodes in same order
27
DFS
visiting one adjacent node and then the next as deep as possible and then backtracking until there is anothe optioon, look at sol on guide
28
Rigiid
software hard to change
29
fragile
software prone to breaking in multiple places upon change
30
portible
software that can be used in dif environments
31
immobile
software that is difficult to re-use
32
static software testing
verification through code review, walkthroughs and inspecitons
33
glass box/white box testing
detailed investigation of the internals of the software. everything is transparent
34
black box testinng
tester only cares about outcomes and inputs, no access to code itself is needed
35
unit testing
dyunamicallyu executing unids of code to verify individual performance
36
waterfall mdoel
linear, predetermiend phases and milestones. googhle it