This repository contains all the answers to Algoexpert's 160 coding interview questions. The purpose of this repository is to overcome my algorithmic problems.
The question will be answered by difficulty. That means I will start from the easiest problems and work my way to the most complex problems.
I will use python as my preferable language, and answer of problems will be inside a separate folder with my solutions and explanations.
No. | Problem | Description | Solution |
---|---|---|---|
1. | Two Numbers | Given an array of integers and a target value, write a function that returns two member of the array that add up to the target value. The function should return the indexes of the two numbers in the array.t. You may assume that each input would have exactly one solution, and you may not use the same element twice. | Solution |
2. | Validate Subsequence | Given two non-empty arrays of integers, write a function that determines whether the second array is a subsequence of the first one. | Solution |
3. | Sorted Squared Array | Write a function that takes in a non-empty array of integers that are sorted in ascending order and returns a new array of the same length with the squares of the original integers also sorted in ascending order. | Solution |
4. | Tournament Winner | Given two array, one consisting pair of competitors who competed in certain games and another array consisting the result of that respective game. Write a function that will find out which team/competitor won the tournament. | Solution |