From 16af25ba3010b375c78879ae8355100565e46547 Mon Sep 17 00:00:00 2001 From: qiugh Date: Mon, 25 Dec 2017 16:33:31 +0800 Subject: [PATCH] Update README.md --- README.md | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 251e483..b642d9c 100644 --- a/README.md +++ b/README.md @@ -39,8 +39,8 @@ A common data-structure and basic algorithm implemention in javascript * [Merge-Sort](#sorting-algorithms) * [Quick-Sort](#sorting-algorithms) * [Heap-Sort](#sorting-algorithms) - * [Statistics Algorithms](#Grubbs) - * [Grubbs](#Grubbs) + * [Statistics Algorithms](#statistics-algorithms) + * [Grubbs](#grubbs) * [Test](#test) * [Contributing to node-ds](#contributing-to-node-ds) @@ -211,16 +211,14 @@ SortFamily.insertionSort(a, compare, 3, 6); // outputs [6, 9, 3, 8, 4, 2, 1 +#### Grubbs +```javascript const Grubbs = require('node-ds/Grubbs.js'); let data = [7, 9, 2, 6, 3, 5, 7, 2, 4, 20]; let grubbs = new Grubbs(data); grubbs.getOutliers();//outputs [9], means the number 20 is outlier - - +``` ## Test Like most other packages, just run test suite and check code coverage by following commands: