summaryrefslogtreecommitdiff
path: root/sort/insertion_test.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2020-07-14 08:53:17 +0100
committerPaul Buetow <paul@buetow.org>2020-07-14 08:53:17 +0100
commit554a7a259f3feefb586374ac5a3b57acc99a4446 (patch)
tree33ad06e30abb352609dd4f75306504f6548caec8 /sort/insertion_test.go
parent7f0751cad2196932f16f753fdaf53bc3eea670b8 (diff)
add insertion sort
Diffstat (limited to 'sort/insertion_test.go')
-rw-r--r--sort/insertion_test.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/sort/insertion_test.go b/sort/insertion_test.go
new file mode 100644
index 0000000..4b503b8
--- /dev/null
+++ b/sort/insertion_test.go
@@ -0,0 +1,12 @@
+package sort
+
+import (
+ "algorithms/ds"
+ "testing"
+)
+
+func BenchmarkInsertion1000(b *testing.B) {
+ a := ds.RandomIntegers(1000, 1000)
+ b.ResetTimer()
+ Insertion(a)
+}