DSA REVIEWER

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall with Kai
GameKnowt Play
New
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/119

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

120 Terms

1
New cards

using System;

Gives access to Console and other basic tools.

2
New cards

namespace SampleApp

Groups related classes and code.

3
New cards

class Program

C# is class-based; all code lives in classes.

4
New cards

static void Main(string[] args)

Main method where execution begins.

5
New cards

Console.WriteLine()

Built-in method for printing to the screen.

6
New cards

C# (C-Sharp)

A modern, object-oriented programming language developed by Microsoft.

7
New cards

.NET Framework

A software development platform developed by Microsoft that includes a large class library and provides language interoperability.

8
New cards

Microsoft Visual Studio

A powerful integrated development environment (IDE) used to develop C# applications.

9
New cards

int

4 bytes; used for whole numbers.

10
New cards

float

4 bytes; used for decimal numbers (less precision).

11
New cards

double

8 bytes; used for decimal numbers (more precision).

12
New cards

char

2 bytes; used for a single character.

13
New cards

string

Varies; used for text or group of characters.

14
New cards

bool

1 byte; used for True/False values.

15
New cards

C# Syntax

Defines how code is written so that the compiler can understand and execute it.

16
New cards

Semicolon (;)

Ends a statement.

17
New cards

Braces {}

Groups code blocks used in methods and classes.

18
New cards

Main method

Program entry point.

19
New cards

Control structures

Allow decision-making and repetition in programs.

20
New cards

Variables

Containers for storing data.

21
New cards

Rules for variable names

Must start with a letter or underscore, can't use reserved words, case-sensitive, and should use meaningful names.

22
New cards

const double Pi

A constant value representing the mathematical Pi, set to 3.1416.

23
New cards

for loop

Repeats a block for a known number of times.

24
New cards

Conditional Statements

Control structures that execute different actions based on whether a specified condition is true or false.

25
New cards

Switch Statement

A control statement that allows a variable to be tested for equality against a list of values.

26
New cards

Loops

Control structures that repeat a block of code multiple times.

27
New cards

Declaration

The process of defining a variable's type and name.

28
New cards

Initialization

The process of assigning a value to a variable at the time of declaration.

29
New cards

Variable Naming Rules

Variables must start with a letter or underscore, cannot use reserved words, are case-sensitive, and should have meaningful names.

30
New cards

Constants

Fixed values that cannot be changed once set, declared using the 'const' keyword.

31
New cards

Algorithm

A step-by-step procedure or set of rules for solving a problem or performing a task.

32
New cards

Data Structure

An organized way to store and manage data for efficient access and modification.

33
New cards

Common Data Types

Basic types of data, including int (integers), double (floating-point numbers), char (single characters), string (sequence of characters), and bool (true/false values).

34
New cards

Arithmetic Operators

Operators used to perform mathematical operations: +, -, *, /, %.

35
New cards

Comparison Operators

Operators used to compare two values: ==, !=,

36
New cards

Logical Operators

Operators used to perform logical operations: && (AND), || (OR), ! (NOT).

37
New cards

Linear Data Structures

Data structures arranged in a sequence, such as Arrays, Linked Lists, Stacks, and Queues.

38
New cards

Non-Linear Data Structures

Data structures that are hierarchical or network-like, such as Trees and Graphs.

39
New cards

Hash-based Structures

Data structures that allow fast access via keys, such as Hash Tables.

40
New cards

Big-O Notation

A mathematical notation that describes the worst-case upper bound of an algorithm's running time.

41
New cards

Divide and Conquer

A strategy for solving problems by breaking them down into smaller subproblems, solving each subproblem independently, and combining their results.

42
New cards

Real-World Scenario for Algorithms

Examples of algorithms in practice, such as finding a word in a dictionary or organizing a tournament.

43
New cards

Type Inference

The ability of a programming language to automatically deduce the type of a variable.

44
New cards

Example of Variable Declaration

var name = 'Maria'; // string

45
New cards

Example of Variable Initialization

var age = 30; // int

46
New cards

Big O Notation (O)

Tells us the maximum work an algorithm could take.

47
New cards

Omega Notation (Ω)

Represents the lower bound of running time.

48
New cards

Theta Notation (Θ)

Represents the tight bound (average growth rate).

49
New cards

Divide and Conquer (D&C)

A problem-solving strategy where you break a problem into smaller subproblems, solve each subproblem, and merge the solutions.

50
New cards

Primitive Data Structure

These are predefined data, supported by the programming language, allowing storage of only single data type values.

51
New cards

Non-Primitive Data Structure

A data structure that allows you to store multiple data type values.

52
New cards

Linear List

The elements are arranged in sequence one after the other.

53
New cards

Non-Linear List

Elements in non-linear data structures are not in any sequence, arranged in a hierarchical manner.

54
New cards

Array Data Structure

In an array, elements in memory are arranged in continuous memory and all elements are of the same type.

55
New cards

Graph Data Structure

In graph data structure, each node is called vertex and each vertex is connected to other vertices through edges.

56
New cards

Stack Data Structure

In stack data structure, elements are stored in the LIFO principle.

57
New cards

Queue Data Structure

A data structure that follows the FIFO principle.

58
New cards

Linked List

A data structure consisting of nodes where each node points to the next node.

59
New cards

Worst-case scenario

The maximum time taken by an algorithm in the least favorable conditions.

60
New cards

Best-case scenario

The minimum time taken by an algorithm in the most favorable conditions.

61
New cards

Average-case scenario

The expected time taken by an algorithm under typical conditions.

62
New cards

Spanning Tree

A spanning tree is a subgraph that includes all the vertices of the graph with the minimum number of edges.

63
New cards

Minimum Spanning Tree

A minimum spanning tree is a spanning tree with the least total edge weight.

64
New cards

Strongly Connected Components

Strongly connected components are subgraphs where every vertex is reachable from every other vertex.

65
New cards

Adjacency Matrix

An adjacency matrix is a square matrix used to represent a finite graph, where the elements indicate whether pairs of vertices are adjacent.

66
New cards

Adjacency List

An adjacency list is a collection of lists or arrays that represent a graph, where each list corresponds to a vertex and contains the adjacent vertices.

67
New cards

Undirected Graph

An undirected graph is when each node has a reciprocal connection.

68
New cards

Directed Graph

A directed graph is a graph where edges have a direction, indicating a one-way relationship.

69
New cards

Tree Data Structure

A tree is a collection of vertices and edges with only one edge between any two vertices.

70
New cards

Binary Tree

A binary tree is a tree data structure where each node has at most two children.

71
New cards

Binary Search Tree

A binary search tree is a binary tree where the left child contains only nodes with values less than the parent node and the right child only nodes with values greater.

72
New cards

AVL Tree

An AVL tree is a self-balancing binary search tree where the difference in heights between left and right subtrees cannot be more than one.

73
New cards

B-Tree

A B-tree is a self-balancing tree data structure that maintains sorted data and allows searches, sequential access, insertions, and deletions in logarithmic time.

74
New cards

B+ Tree

A B+ tree is an extension of a B-tree that maintains all values at the leaf level and allows for efficient range queries.

75
New cards

Red-Black Tree

A red-black tree is a balanced binary search tree with an additional property that ensures the tree remains approximately balanced during insertions and deletions.

76
New cards

Linked List Data Structure

In linked list data structure, data elements are connected through a series of nodes, each containing data items and the address to the next node.

77
New cards

Pseudocode

It is a simpler version of a programming code in plain English which uses short phrases to write code for a program before it is implemented in a specific programming language.

78
New cards

Program

It is exact code written for a problem following all the rules of the programming language.

79
New cards

Relational Operators

These compare two values and return true or false, often used in decision-making.

80
New cards

Assignment Operators

These are used to assign values to variables, sometimes with operations.

81
New cards

if Statement

The if statement executes a block of code only when a condition is true.

82
New cards

if-else Statement

The if-else statement executes one block of code if the condition is true, and another if it is false.

83
New cards

if-else if Ladder

When there are multiple conditions to check, you use an if-else if ladder.

84
New cards

Arithmetic

Used in calculations (e.g., total cost in shopping cart).

85
New cards

Relational

Used for comparisons (e.g., checking pass/fail in grading).

86
New cards

Logical

Used in conditions (e.g., ATM withdrawal checks).

87
New cards

Assignment

Used to update values (e.g., updating fitness tracker steps).

88
New cards

while Loop

The while loop is used when the number of iterations is not known in advance—it runs as long as the condition is true.

89
New cards

do-while Loop

The do-while loop is similar to while, but it executes at least once, even if the condition is false.

90
New cards

foreach Loop

The foreach loop is used to iterate through a collection or array.

91
New cards

Two-Dimensional (2D) Array

A table-like structure (rows and columns). Accessed by two indices.

92
New cards

int[] scores = { 85, 90, 78, 92, 88 };

Creates a 1D array with 5 integers.

93
New cards

scores.Length

Gets the size of the array (5 elements).

94
New cards

int[,] grades

Declares a 2D array (matrix).

95
New cards

Outer loop (i)

Iterates through rows (students).

96
New cards

Inner loop (j)

Iterates through columns (subjects).

97
New cards

Insertion

Adding an element at an index - requires shifting elements.

98
New cards

Deletion

Removing an element at an index - requires shifting elements.

99
New cards

Traversal

Visiting elements of an array.

100
New cards

Searching

Finding a specific element in an array.