binary_search_frequency 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/binary_search_frequency.gemspec +1 -1
- data/lib/binary_search_frequency/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26944f370a6beb153abbcd79d40d2934e6003942
|
4
|
+
data.tar.gz: 1aa7b92a0640f24d408dcce675a55f615282ca90
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b3262f2ed01a075c34cadb893c8df5fdda0f5831839487b795d8cfabc31fbb8c717561fb785bab377af224b7729ff83bfd0a7e89dee1716e2e0845dec55c8af
|
7
|
+
data.tar.gz: e7df75512319e2ce376b80b2334f0d631690e608871a77d33d5ec2a0761114f50a753dd6941436cb3610f849fb4e67c95309fdac40ac957024df2475a63c4e0a
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# BinarySearchFrequency
|
2
2
|
|
3
|
-
|
3
|
+
Can be used to get the frequency of an item in an already sorted array in logarithmic time using a modified binary search.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -18,7 +18,8 @@ Or install it yourself as:
|
|
18
18
|
|
19
19
|
## Usage
|
20
20
|
|
21
|
-
|
21
|
+
[1,2,4,4,5,5,5,6,6,7,8,9].bfrequency 5 #returns 3 since the number 5 appears three times in the array
|
22
|
+
|
22
23
|
|
23
24
|
## Contributing
|
24
25
|
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.email = ["mishaAconway@gmail.com"]
|
11
11
|
spec.summary = %q{ruby gem for getting the frequency of an item in a sorted array in log time}
|
12
12
|
spec.description = %q{ruby gem for getting the frequency of an item in a sorted array in log time}
|
13
|
-
spec.homepage = ""
|
13
|
+
spec.homepage = "https://github.com/MishaConway/binary_search_frequency"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: binary_search_frequency
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Misha Conway
|
@@ -56,7 +56,7 @@ files:
|
|
56
56
|
- lib/binary_search_frequency/array.rb
|
57
57
|
- lib/binary_search_frequency/binary_search_frequency.rb
|
58
58
|
- lib/binary_search_frequency/version.rb
|
59
|
-
homepage:
|
59
|
+
homepage: https://github.com/MishaConway/binary_search_frequency
|
60
60
|
licenses:
|
61
61
|
- MIT
|
62
62
|
metadata: {}
|