Why is space complexity important to consider when analysing binary tree search?
Because the algorithm is recursive, it places a demand on the call stack
What is the Merge sort algorithm’s complexity
O(n log n)
Give two reasons why smaller time complexity is better
Give two reasons why a smaller space complexity is better
What is the purpose of Dijkstras algorithm?
Can the graph be directed/weighted?
What approach does merge sort take to sort a list?
Divide and conquer
What is bubble sort’s time complexity? Why?
O(n^2). Since it involves a for loop within a for loop. You need to do n passes of the list/array, and each pass involves up to n comparisons.
Hierarchy of complexities (polynomial, logarithmic, constant, exponential, linear)
constant < logarithmic < linear < polynomial < exponential
What is a first class object?
First class objects are objects which may:
- R - be returned in function calls
- A - be assigned as arguments
- V - be assigned to a variable
- E - appear in expressions
Functions are first-class objects in functional programming languages
What does function application mean?
Applying a function to its arguments
What does partial function application mean?
One or more arguments to a function are fixed, creating a new function with fewer arguments.
What is a URL?
What is a domain name server?
A server that contains databases which map FQDNs to their corresponding IP addresses.
‘www.w3schools.com’ is an example of a…
Fully qualified domain name
‘www’ is an example of a…
Host name or subdomain
‘w3schools.com’ is an example of a…
Domain name
‘/cs/cs_operators.asp’ is an example of a…
Path
Describe how domain names are organised
What is the purpose of a domain name?
What is the purpose of a domain name server?
To translate a fully qualified domain name into its corresponding IP address
What is the domain name system?
What happens if a domain name server cannot resolve a lookup?
The query will be passed to another DNS server
Who manages top level domains?
What are the three main responsibilities of an internet registry?
To maintain a definitive register of who owns a specific domain.
To enter domain names to IP address mappings into the DNS system
The ensure domain names are unique, and only used by one organisation