Skip to content

High order functions in Swift: binary search, find missing element, merge sort, most common element and two sum problem

License

Notifications You must be signed in to change notification settings

andrewcar/highorderfunctions

Repository files navigation

High Level Algorithms

Merge-Sort

Split an array of integers into individual arrays and then sort them into a new array in ascending order.

Most-Common Element

Find the most common element(s) in an array and return it.

Find Missing Element

Was asked to solve this for a Fortune 500 company. Here is the solution using Most-Common-Element.

Binary Search

A Boolean function that tells you if an Int can be found in an array.

Two Sum Problem

A brute force solution to finding out whether there are two items in an array that add up to a provided sum.

About

High order functions in Swift: binary search, find missing element, merge sort, most common element and two sum problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages