AnnotationPrep

micro1 AI Coding & Technical Screening Test practice test

9 practice questions for this assessment, each with the grading rationale and underlying rule.

Start practising

Coding assessment: debugging & verification: practice drill

10 scenarios, graded as you go, with the exact grading principle for every answer. Start free, no sign-up.

Practice tests that prepare you for this assessment

Practise by topic

About this assessment

Platform
micro1
Availability
Remote / Global

Exact question counts, time limits, and project rubrics vary by platform cohort and qualification tier. Always read the platform's live project instructions carefully.

Sample scenarios

An LLM writes:

```js
function getTimeout(opts) {
return opts.timeout || 3000;
}
```

If a caller explicitly passes `{ timeout: 0 }` (meaning no timeout), what does `getTimeout` return?

  1. `0`.
  2. `3000`, because `0` is falsy in JavaScript—it should use nullish coalescing (`opts.timeout ?? 3000`).
  3. `undefined`.
  4. `NaN`.
Show the answer

B. `3000`, because `0` is falsy in JavaScript—it should use nullish coalescing (`opts.timeout ?? 3000`).

Using `||` falls back on any falsy value (`0`, `''`, `false`). Nullish coalescing `??` only falls back on `null` or `undefined`, preserving `0`.

Principle: JavaScript Operators: Nullish Coalescing (??) vs OR (||)

An LLM writes a binary search function:

```python
def binary_search(arr, target):
lo, hi = 0, len(arr) - 1
while lo < hi:
mid = (lo + hi) // 2
if arr[mid] == target:
return mid
elif arr[mid] < target:
lo = mid + 1
else:
hi = mid - 1
return -1
```

On which valid input does this fail?

  1. Empty array `[]`.
  2. A 1-element array `[7]` when `target = 7` (returns `-1` because `lo == hi` exits `while lo < hi`).
  3. Any array with negative numbers.
  4. It enters an infinite loop on `[1, 2, 3]`.
Show the answer

B. A 1-element array `[7]` when `target = 7` (returns `-1` because `lo == hi` exits `while lo < hi`).

With `lo, hi = 0, 0`, `while lo < hi` is immediately False, so `binary_search([7], 7)` returns `-1`. Classic off-by-one bug: the condition must be `while lo <= hi:`.

Principle: Algorithms: Binary Search Boundary Conditions

An LLM writes:

```sql
SELECT * FROM users WHERE id NOT IN (SELECT user_id FROM banned_users);
```

If `banned_users.user_id` contains even a single `NULL` value, what does this query return?

  1. All non-banned users.
  2. Zero rows (empty set), because `id NOT IN (1, 2, NULL)` evaluates to `UNKNOWN` for every row.
  3. Only the rows where `id` is `NULL`.
  4. Raises a division-by-zero error.
Show the answer

B. Zero rows (empty set), because `id NOT IN (1, 2, NULL)` evaluates to `UNKNOWN` for every row.

In SQL three-valued logic, `x NOT IN (1, NULL)` means `x != 1 AND x != NULL`, which is always `UNKNOWN` (never `TRUE`). Prefer `NOT EXISTS` or filter `WHERE user_id IS NOT NULL` inside the subquery.

Principle: SQL Three-Valued Logic: NOT IN with NULL

Taking this assessment soon?

Tell us what skills or question formats you want more drills on.

Other Coding & SWE Evaluation assessments