CS General Flashcards

1
Q

Statically typed language

A

Type of a variable needs to be defined in advance and cannot be changed.
(E.g Golang => var counter int;)

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

Dynamically typed language

A

The type of variables is fluid. Languages include Python, Ruby, ..

my_var = 1
my_var = “string”
print(my_var)

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

Linear Complexity

A

O(n)
describes an algorithm who’s complexity will grow in direct proportion to the size of the input data. E.g. Linear search or an array.

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

Logarithmic complexity

A

O(log N)

logarithm of 8 for base 2 = log2(8) = 3
logarithm of 16 for base 2 = log2(16) = 4
-> input doubled, (8 to 16); but output only increased 1/3 (3 to 4)

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

Hamming Weight

A

The Hamming weight of a string is the number of symbols that are different from the zero-symbol of the alphabet used.

String	                Hamming weight
11101	                4
11101000	                4
00000000	        0
678012340567	10
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Most significant bit (MSB)

A

In a binary number, the bit furthest to the left is called the most significant bit (msb) and the bit furthest to the right is called the least significant bit (lsb)

The MSB gives the sign of the number (sign bit) , 0 for positive and 1 for negative

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

PEP

python

A

Python Enhancement Proposals

A PEP is a design document providing information to the Python community, or describing a new feature for Python or its processes or environment. The PEP should provide a concise technical specification of the feature and a rationale for the feature.

PEP 8 -> Style guideline by Guido van Rossum

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

TypeScript vs JavaScript

A

TS pros:
- Static typing (static declaration of variables)
- Improved readability
-

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

O(n^2)

A

Quadratic complexity

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

Exponential time complexity

A

O(2^n)

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

Interpreted Programming language

A

Interpreters run through a program line by line and execute each command. You write code for the interpreter, which is basically the same on every machine.

You always export the actual code to where ever the program is executed. No platform dependence, but everyone sees what the code constitutes of.

Humus recipe in ancient greek:
=> you have a friend who speaks greek sitting next to you who translates on the go

PHP, Ruby, Python, and JavaScript.

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

Compiled programming languages

A

Compiled languages are converted directly into machine code that the processor can execute. As a result, they tend to be faster and more efficient. They also give the developer more control over hardware aspects, like memory management and CPU usage.

Since you export a binary to where ever the program is executed, there is a platform dependence.

Humus recipe in ancient greek:
=> you receive a translation and work off of that

E.g. C, C++, Erlang, Haskell, Rust, and Go

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

Fuzzy search

A

Fuzzy search is a search technique that finds results that are similar to a search query, even if the query doesn’t match exactly

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