Section 1

Preview this deck

argument

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 14, 2020

Cards (35)

Section 1

(35 cards)

argument

Front

the actual value of a parameter

Back

In-order traversal

Front

To vist the left branch, the current node, and then the right node in that order.

Back

binary search tree

Front

a binary tree where the right child node is greater than the left child node.

Back

method

Front

a named procedure associated with a class that performs a predefined action

Back

Geometric Series(Adding numbers with multiplier)

Front

Back

Adjacency list

Front

a list that stores each adjacent nodes for every node in the graph.

Back

Full binary tree

Front

a full binary tree is a binary tree in which every node has either zero or two children

Back

breadth-first search

Front

explore each neighbor before going on to any of their children

Back

trie

Front

an ordered data structure that is generally used to store string. It is fast to check if the string, or a prefix of the string is valid. Can check to see if a string is a valid in O(K) time where k is the length of the string.

Back

depth-first search

Front

explore each branch until completion

Back

Harmonic Series(adding numbers with a divisor)

Front

sum of 1/n diverges, but alternating harmonic series converges to ln 2

Back

node

Front

a basic unit of computer science

Back

Preprocessor directives

Front

Preprocessor directives are lines included in the code preceded by a hash sign (#). These lines are directives for the preprocessor. The preprocessor examines the code before actual compilation of code begins and resolves all these directives before any code is actually generated by regular statements.

Back

Static Variables

Front

Variables that have a space in COMPILE TIME, so if you have a static variable in a function, it will contain the retain its value even if the function returns something. Also, static variables can be a Global variable for a SPECIFIC FILE.

Back

Adjacency Matrix

Front

a NxN boolean matrix that where a true value at matrix[i][j] indicates an edge from node i to node j.

Back

overloaded constructors

Front

a constructor that takes a different type of parameter from the class constructor

Back

Post-Order Traversal

Front

to check the children node before the current nodde.

Back

Arithmetic Series(Adding a series of numbers that increment by a number d)

Front

sum_(k=1)^nk=1/2n(n+1)

Back

stack

Front

a abstract data type that stores items in a LIFO(last in- first out) ordering. Has operations, push, pop, peek, and isempty()

Back

Min heap/max heap

Front

a min-heap is a complete binary tree where each node is smaller than is children. Has the operations, Insert and extract_min Insert at the right most bottom, then swap it to the right position. log(n) time to swap.

Back

perfect binary tree

Front

a binary tree that is both full and complete. It must have 2^k-1 nodes

Back

Abstract Data Type

Front

An abstract data type is a class of objects that may be defined by their set of values and functions(multiplication, division, push,pop)

Back

C++ Matrix

Front

matrix[height][width] matrix[1][3] is 0 1 2 3 0 1 x 2 3

Back

queue

Front

a abstract data type that stores items in a FIFO(first in, first out) ordering. Has operations, add, remove, peek, and isempty()

Back

class

Front

a user defined type or data structure that has data and functions(methods)

Back

Macro

Front

A macro is a fragment of code which has been given a name. Whenever the name is used, it is replaced by the contents of the macro.

Back

Pre-Order Traversal

Front

To check the current node, the left node, and then the right node.

Back

Singleton Class(anti-pattern)

Front

Ensures that a class has only one instance and ensures access to the instance through application Can interfere with unit testing

Back

binary tree

Front

a tree with at most 2 children per node

Back

complete binary tree

Front

a complete binary tree is a binary tree in which each level is filled, with the possible exception of the lowest right mode node.

Back

signature

Front

The method name and the parameter's type. Does not include the method's return type. For example: Foo() Foo(int) Foo(String) Foo(int, string) Foo(string, int)

Back

Factory Method

Front

Offers an interface for creating an instance of a class. public class CardGame{ public static CardGame createCardGame(gametype type{ if (type == GameType.poker){ return new PokerGame(); } elseif(type == GameType.BlackJack){ return new BlackJack(); } return null; } }

Back

class constructor

Front

a class constructor is a function that creates an object with default initial values specified by the programmer

Back

parameter

Front

a parenthetical variable(type and variable) in a function or a constructor

Back

Steps to approaching Object Oriented Design(OOD)

Front

1) Handle Ambiguity(Who, what, when, where, and why) 2) Define the core objects(entity and their attributes) 3) Define Relations(do they inherit from one other) 4) Further define relation(how do they activate each other, and more attributes)

Back