Skip to content

Instantly share code, notes, and snippets.

View mximenes88's full-sized avatar
💻
Cybersecurity

Morgana Ximenes mximenes88

💻
Cybersecurity
View GitHub Profile
@mximenes88
mximenes88 / graphs_and_trees_answers.txt
Last active September 19, 2018 15:40
Graphs & Trees Checkpoint - Web Development @ Bloc
#### Exercises
1. What is a binary tree and what makes it unique to other trees?
A binary tree is a data structure consisting of nodes that contain a ‘left’ and a ‘right’ reference. A binary tree is unique because every Node can only have up to two child Nodes.
2. What is a heuristic?
Heuristic are ‘best’ guesses used to solve complex problems quickly. Accuracy can be sacrificed for speed.
3. What is another problem besides the shortest-path problem that requires the use of heuristics
@mximenes88
mximenes88 / hash-tables.txt
Last active September 19, 2018 15:41
Hash Table Checkpoint- Web Development Track @ Bloc
#### Exercises
1. What is a hash table?
A hash table is a data structure that stores each value by connecting it to a key, forming key-value pairs.
2. What is hashing?
Hashing is the process of converting data into a hash code using a hashing function.
3. How does a hash table store data
A hash table store data by converting the key into a hash code and storing it in an array index.
#### Exercises
1. What is a hash table?
A hash table is a data structure that stores each value by connecting it to a key, forming key-value pairs.
2. What is hashing?
Hashing is the process of converting data into a hash code using a hashing function.
3. How does a hash table store data
A hash table store data by converting the key into a hash code and storing it in an array index.
@mximenes88
mximenes88 / linked-lists-answers.txt
Last active September 14, 2018 00:53
Linked Lists- Web Development Track @ Bloc
#### EXERCISES
1. What are some pros and cons of using linked lists instead of arrays?
Pros:
✓Linked lists do not contain empty placeholders as nodes are created dynamically
✓Due to the fact that nodes are independent in memory, the operating system can use any available memory what allows for linked lists to be huge in size.
Cons:
.Inefficient way to access elements within the list. Elements must be accessed in order , starting from the head or first node.
@mximenes88
mximenes88 / stacks_and_queues.txt
Created September 6, 2018 00:27
Stacks & Queues- Web Developer track @ Bloc
#### Exercises####
1) What is the main difference between a stack and a queue?
Stack is a data structure that arranges elements in LIFO(last-in-first-out) order, and uses “push” to insert and “pop” to remove an element.
Queue is a data structure that arranges elements in FIFO(first-in-first-out) order, and uses “enqueue” to insert data and “dequeue” to remove data.
2) What are the similarities between stacks and queues?
Both are data structures in which elements are store and retrieved.
@mximenes88
mximenes88 / intro-data-structures.txt
Created September 3, 2018 14:31
Introduction to Data Structures - Web Developer Track @ Bloc
#### EXERCISES
1. Given the above real-world information, use an array data structure to code the following solution.
a) Use an array input: ["Vivian", "Ava", "Josh", "Patrick", "Mike"]
var namesArr = ["Vivian", "Ava", "Josh", "Patrick", "Mike"]
b) Insert a new person, "Mary" at the end of the line. In other words, you should insert Mary after Mike.
@mximenes88
mximenes88 / pseudocode_answers.txt
Created September 1, 2018 01:27
Introduction to Pseudocode - Web Developer Track @ Bloc
#### SHORT ANSWER
1) Why do programmers use pseudocode?
Programmers use pseudocode to help them develop an algorithm and how to end product should look like. Pseudocode helps programmers to structure and explore the logic of the program in a more human friendly manner
2) If you run pseudocode on your computer what would happen?