/algorithms-Interview-tests

Algorithms which will help you prepare your next coding interview or just keeping your skills sharp XD

Primary LanguageJavaScript

Build Status

Introduction

This repository helps you prepare for your coding interview for companies like (Microsoft, Amazon, Facebook, DeliveryHero...)


Table of contents

Installation

git clone https://github.com/chehabz/algorithms-Interview-tests.git \
&& cd algorithms-Interview-tests

Bubble Sort

The algorithim operates in O(n) time complexity and O(1) space at best. The algorithim will loop the array n times and will perform a swap of array index content to push the largest integer to the right side of the array.

assert.deepEqual(bubbleSort(
    [-1, 5, 0,  - 5, 3, 2, 8] ),
    [-5, -1, 0, 2, 3,  5, 8);