Interview Problem Statements

This section shows the problem statements for coding assessment round.

Problem 1: UK Property Postcode Analysis

Introduction

The following dataset shows the price paid for properties sold in the UK. It includes various columns including the Post Code and Price Paid of the sold property.

Question

Use the dataset to work out what, on average, are the 10 most expensive post code prefixes.

Dataset

Download the latest monthly price paid data in CSV from here:

Dataset source reference (not required): Gov.uk Price Paid Data Downloads

Data Guidance
  • There are no headers in the file
  • The 2nd column is the Price Paid amount
  • The 4th column is the Post Code
  • The postcode prefix is the first part of the postcode (e.g., for SE16 7TG the prefix would be SE16)
  • Take a close look at the example input and output below
  • It is possible for the postcode column to be blank, albeit rarely
General Guidance
  • We encourage you to look things up on the internet
  • Attempt to balance efficiency with clear code
  • You don't need to write tests
  • Ask questions if you're not sure
Coding Guidance
  • It should be a console app
  • Don't use any external libraries (even though it would be better to use a CSV library)
  • Linq is not an external library. Feel free to use it as much as you'd like
  • It's not an OO structuring question. You don't need to use interfaces
Example

If we had this data:

PostCode Amount
SE15 2TH 100
SE15 5NY 200
SE12 8TW 33

The output should be:

Prefix Average
SE15 150
SE12 33

Problem 2: Dog Breeds API Analysis

Task

Build a .NET 8/9/10 console app (C#). No third-party libraries.

Data Source

Primary source (preferred):

Call GET https://dogapi.dog/api/v2/breeds

Read results from the JSON:API response under data[*].attributes

Pagination
  • The API may return paginated results
  • If the response contains links.next, keep fetching that URL and append data items
  • Stop when links.next is missing or null
Fields to Use

From attributes, use:

  • name
  • life
  • female_weight

Each of life and female_weight may be:

  • an object: { "min": <number>, "max": <number> }, or
  • a range string: e.g. "10 - 12", "10–12", "10 to 12", "20 - 25 kg"
Normalization Rules (What Value to Rank On)
  • For lifespan ranking: use max life span (upper bound)
  • For female weight ranking: use max female weight (upper bound), in kilograms
Rankings to Output

Produce two lists (exactly 10 items when possible):

  1. Top 10 by max life span (descending)
  2. Top 10 by max female weight (descending)

Tie-breaker: If two breeds have the same max value, sort by name ascending.

Output Format (Console)

Print clean, numbered output starting at 1:

Top 10 by Max Life Span
1. Breed A — max_lifespan=20
2. Breed B — max_lifespan=19
...

Top 10 Heaviest Female Breeds
1. Breed X — max_female_weight=55
2. Breed Y — max_female_weight=52
...
Error Handling

Handle HTTP failures / timeouts / invalid JSON gracefully (don't crash; print a useful message and exit non-zero if you want).