Sorting Algorithm Quiz & Answers

1. What of the following requires the most memory space?

a. Quick Sort
b. Bubble Sort
c. Merge Sort
d. Insertion Sort
e. Selection Sort

Answer: C. Source: https://www.bigocheatsheet.com/#:~:text=Array%20Sorting%20Algorithms%20%20%20%20Algorithm%20,%20O%20%28n%29%20%2010%20more%20rows%20

2. What sorting algorithm is canonically the best for data sets that cannot reside in memory (and must be persisted to disk)?

a. Radix sort
b. Bubble sort
c.

How Do You Troubleshoot a Script or Program That Automates Tasks when The Logs Do Not Help you?

Problem Scenario
An automated process is failing. You look in the logs and they don’t help you. You have Googled the error. What should you do?

Solution
Has it ever worked? If so, did something change?

If not, Google for the command most recently entered before the error happens. New characters could be added into the command that you do not realize.

What is Memoization?

Question
In computer programming, what is memoization?

Answer
Memoization is the act of pre-computing or pre-processing certain values for the sake of an algorithm’s performance. Rather than perform the same exact operation (which could be very complex and computationally expensive) multiple times, memoization will involve writing code to compute it once and store it in memory as a variable. This optimization can allow the call stack to have less to store (e.g.,

What Is The Third Way of the Three-Way Handshake?

Question
You want to know discretely what the third way of the three-way handshake is in the context of TCP/IP networking. What is it?

Short Answer
It is the sending of a TCP packet with a flag of “ACK” from the client to the server/destination.

Longer Answer
The third way is sending a TCP packet with the “ACK” flag (of which several potential flags are possible) to the destination:
Client —–>

What Is The Second Way of the Three-Way Handshake?

Question
You want to know discretely what the second way of the three-way handshake is in the context of TCP/IP networking. What is it?

Short Answer
It is the sending of a TCP packet with a flag of “SYN-ACK” from the server/destination to the initiating client (after the first way was completed).

Longer Answer
The second way is sending a TCP packet with the “SYN-ACK” flag (of which several potential flags are possible) to the destination:
Server —–>

What Does a Colon Mean in Python when You See Something Like This “new_var = a[i:i + counter]”?

Question
You are not familiar with this example of a colon. It appears to be an assignment of a value to itself. You have seen Python function signatures with colons to explain the data type. You have seen colons to signify an if conditional or a for loop. You are not sure what this line of code does:

new_var = a[i:i + counter]

What does this type of colon syntax mean?

How Do You Use Python to Find The Latest Prices of Bitcoin, Ethereum, Litecoin and Ripple?

Problem scenario
You want to use Python to calculate the latest price of various cryptocurrencies. What should you do?

Solution
Prerequisite

This assumes you have installed pip.

Procedures
Install the Python package cryptocompare: pip install cryptocompare

Run this program:

import cryptocompare

print(cryptocompare.get_price(‘BTC’, ‘USD’))
print(cryptocompare.get_price(‘BTC’, ‘USD’))
print(cryptocompare.get_price(‘ETH’, ‘USD’))
print(cryptocompare.get_price(‘LTC’, ‘USD’))
print(cryptocompare.get_price(‘XRP’, ‘USD’))

If you want to receive free cryptocurrency by just learning more,