---
# System prepended metadata

title: Exercise - The Match Case

---

# Exercise - The Match Case

First off - the goal is not to have a working solution (as soon as possible), but to show how you would tackle a technical problem.

As such:
- Describe in your own words the problem is
- Which steps you would take in order to solve it
- Take these steps to work out the algorithm, pseudo-code or actual :)
- Explain how it works, and why it works

After that:
- Given some edge-cases, explain why it does not work (if applicable)
- Work out & explain how to solve for these edge-cases as well

## Problem description
https://leetcode.com/problems/longest-common-prefix

## Hints
- Character at i: `string[i]`
- Return part of string: `string.substr(0, i)`

## Test-cases:
["bedsense", "bed"]
["bedsense", "bednotsense"]
["bed", "bedsense"]
["momo", "momo"]
["bedsense", "bed", "bedsense"]
