# eHealth Africa Hiring Quiz
## 1
```
Given a pattern and a string, find if the string follows the same pattern. Eg: Pattern : [a, b, b, a], String : "cat dog dog cat"
```
## 2
```
Given a number N return whether N is a perfect number or not.
Explain the time and memory complexity of your implementation.
(A perfect number is a positive integer that is equal to the sum of its proper positive divisors excluding the number itself)
```
Because integers are represented as floating point numbers with MAX of approx. _1.79e+308_, the algorithm runs in O(n) linear
time. The limitation is that it can only validate perfect numbers with
[triangle]:
en.wikipedia.org
[isp]:
en.wikipedia.org
[vertex-coloring]:
en.wikipedia.org