206

Aaron Cook
Nov 14, 2020
  1. Tell us about something you learned this week.

2.What are the pros and cons of immutability?

Not changing the original object if a pro since it limits errors. A con is if you want to change something the you have to assign it to a new varible which can make the program a lot bigger which is its own issue.

3.How can you achieve immutability in your own code?

4.What are Divide and Conquer algorithms? Describe how they work. Can you give any common examples of the types of problems where this approach might be used?

Divide and conquer is an algorithm design paradigm based on multi-branched recursion.A divide-and-conquer algorithm works by recursively breaking down a problem into two or more sub-problems of the same or related type, until these become simple enough to be solved directly. Quick sort is an example of it.

5.How do insertion sort, heap sort, quick sort, and merge sort work?

6.What are the key advantages of insertion sort, quick sort, heap sort and merge sort? Discuss best, average, and worst case time and memory complexity.

7.Explain the difference between mutable and immutable objects.

Mutable objects are easy to change where immutable objects dont change

8.What are the three laws of algorithm recursion? Describe them in your own words and what they mean to you.

Must have a base, Must change and move towards the base,Must call itself.

Basically mean its must have a way out of the loop while it has a value that changes on each pass all which being called on itself.

--

--