StudyBrixFree worksheets, study guides and courses

Subjects

Data structures

Choose questions individually, practise online, or create a worksheet with matching answers. Counts include generated variants, not only authored originals.

Make a worksheet37 question instances

Sample exercises

University · Data structures

Which input condition does ordinary binary search require?

  1. A sorted sequence under the comparison rule
  2. Any unsorted sequence
  3. Only positive values
  4. No duplicate values in every variant
Answer and explanation

A sorted sequence under the comparison rule

Ordering enables discarding half the interval safely.

University · Data structures

A procedure performs exactly 3n+2 operations in a stated model. Find the count for n=10.

Answer and explanation

32

3×10+2=32.

University · Data structures

What does a loop invariant describe?

  1. A condition preserved at a specified loop point
  2. The processor brand
  3. A random input guess
  4. Only the final printed word
Answer and explanation

A condition preserved at a specified loop point

Initialization, preservation and termination connect the invariant to correctness.

University · Data structures

An interval of 64 candidates is halved exactly three times. How many remain?

Answer and explanation

8

64/2³=8.

University · Data structures

Why does O(n) not tell us an exact runtime in seconds?

Answer and explanation

It describes asymptotic growth under a cost model, while constants, hardware, implementation and input details affect wall-clock time.

Credit growth versus measured runtime.

University · Data structures

Which is an important test input for a search function?

  1. Only a screenshot
  2. Only a large output font
  3. An empty collection
  4. Only one usual successful case
Answer and explanation

An empty collection

Boundary cases can reveal indexing and termination bugs.

Study notes

Related courses

Computer science4 lessons

Python programming foundations

Learn core Python concepts with paper-based reasoning and small code-reading tasks.

32 quiz questions · University
Computer science4 lessons

Web development foundations

Study HTML, CSS, JavaScript and accessible web structure without a paid bootcamp.

32 quiz questions · University
Computer science4 lessons

SQL and relational databases

Learn tables, queries, joins and data modelling with original exercises.

32 quiz questions · University
Computer science4 lessons

Data science foundations

Work through data cleaning, visualization, modelling and interpretation.

32 quiz questions · University
Computer science4 lessons

Cybersecurity foundations

Study defensive security, privacy and risk management without offensive exploitation instructions.

32 quiz questions · University
Computer science4 lessons

Spreadsheet skills

Learn formulas, references, cleaning and charts for practical study and office work.

32 quiz questions · University