logo

Crowdly

Browser

Додати до Chrome

Questions Bank (1622645 total)

1. What does it mathematically mean that f(n) = O(g(n)), in your own words? [3]

2. Assuming that f(n) = O(n^2) and g(n) = O(n^2 logn), what should be f(n) + g(n)? Why? Simplify the resulting expression. [3]

3. What is the worst-case time complexity of the function "func2"? Explain. When providing your analysis, don't forget to specify what is the input size. [4]

Image failed to load

Переглянути це питання

1. Briefly describe a bit-vector, giving details about

  • How an element of a set is represented by means of a bit-vector
  • How bit-vector based sets operate
Give an example of a set and its representation as a bit-vector. [3]

2. What is the best-case and worst-case time complexity of the remove() and intersection() operations for a Set ADT, if implemented with an array? Explain (no explanation, no marks). [4]

3. What are the main advantages and disadvantages of an array-based implementation of the Set ADT compared to a bitvector-based implementation? State the advantages and disadvantages as separate sections for each. [3]

Переглянути це питання

1. What is an abstract data type and how does it differ from data type? Give an example of an abstract data type and also of a data type in Python. [3]

2. Briefly describe Stack ADT giving details about [4]

  • Main property of a Stack ADT [2]
  • Key operations of the Stack ADT [2]

3. What is the best-case and worst-case time complexity of operation pop() for a Stack ADT, if implemented with an array? (no explanation, no marks) . [3]

Переглянути це питання

1. Briefly describe List ADT giving details about [4]

  • Main property of a List ADT; [2]
  • Key operations of the List ADT. [2]

2. What is the best-case and worst-case complexity of operation add() for a Sorted List ADT, if implemented with an array? Assume that item search is done with binary search. Explain the reason for the best and worst case. No explanation no marks. [3]

3. State (in total) three advantages and/or disadvantages of Linked Nodes data structures? [3]

Переглянути це питання
Given the below code what is the length of the union of the two sets x and y at the end of the following block of code:

x = ASet(10)

y = ASet(10)

x.add(1)

x.add(1)

y.add(9)

y.add(2)
❌
0%
0%
0%
Переглянути це питання
What is the best- and worst-case time complexity of Insertion Sort?
✅
❌
❌
❌
Переглянути це питання
Which of the following data structures is commonly used to implement a queue?
0%
0%
0%
0%
Переглянути це питання
If a stack is used to check for balanced parentheses in an expression, what is the time complexity of the algorithm?

Consider n to be the length of the expression.
0%
0%
0%
0%
Переглянути це питання

Un cuerpo tiene una energía cinética  de 605 J. Si su velocidad se duplica la energía cinética final será:

Переглянути це питання
Bajo la acción de las fuerzas conservativas sobre un objeto, se mantiene constante la energía:
0%
0%
0%
0%
Переглянути це питання