data_structures_101 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a5ee7c74cd4fd38e119bb0058e562d7e8b165a9
4
- data.tar.gz: bd3ee1e47e446c1a1030c2fb691af1347ffe18e0
3
+ metadata.gz: c7fb91f6158a358309e3a072704afe54e6c1b090
4
+ data.tar.gz: 8e4bc2cbc54300101e3333853e229a21d889c649
5
5
  SHA512:
6
- metadata.gz: ac3297439e7fc41529aa29c6657765dfbcdf56bec8c6e17454ff8ad607baca4a24f5f922ed85a12eae9aea9f950c5cb7b5432f4b0142f4f6c9c0670ed0b665f5
7
- data.tar.gz: d28997562681c7028e9793fc1bad0fbdff5e27fa2194809ced10f6cc5fd9dff75d64e9e089da19259aab5a34ad68404f0a146a891e583c6e656b4d3fd02421d4
6
+ metadata.gz: 0fcba7fd2564eb6ade7cb8fb8a9409a4a88e67287f1377bdb6edfd6514c56ecfb8cd1b8c16a8bac1b026cd6a96cd4a2e593479e74618a533eb8d0e27cd79af8d
7
+ data.tar.gz: 5fd3fc1ea446f8b1c2da7a18b0ed87e023baef177f4d4862510fa859418babf90509d90669f8984087eb2e6486a7dd448f6f006cbcd920d762879e9dfc090a6f
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # DataStructures101 [![Build Status](https://travis-ci.org/renehernandez/bok-data_structures_101.svg?branch=master)](https://travis-ci.org/renehernandez/bok-data_structures_101)
1
+ # DataStructures101 [![Build Status](https://travis-ci.org/renehernandez/data_structures_101.svg?branch=master)](https://travis-ci.org/renehernandez/bok-data_structures_101) [![Gem Version](https://badge.fury.io/rb/data_structures_101.svg)](https://badge.fury.io/rb/data_structures_101)
2
2
 
3
3
  DataStructures101 is a simple gem that groups several implementations of common data structures usually taught in Computer Science courses. The overall goal of the gem is to provide easy to use functionality (trying to match the behavior of existent structures in Ruby) while providing the user with a framework to test and compare their implementations against.
4
4
 
@@ -32,7 +32,7 @@ To create a LinkedList
32
32
  list = DataStructures101::LinkedList.new
33
33
  ```
34
34
 
35
- For more information in the `LinkedList` class, check [this post](https://bitsofknowledge.net/data-structures-101-linked-list) and read the documentation.
35
+ For more information in the `LinkedList` class, check [this post](https://bitsofknowledge.net/2017/08/05/data-structures-101-linkedlist-implementation) and read the documentation.
36
36
 
37
37
  ## Contributing
38
38
 
@@ -52,16 +52,16 @@ module DataStructures101
52
52
 
53
53
  private
54
54
 
55
- def new_capacity()
56
- 2 * capacity - 1
55
+ def new_capacity
56
+ 2 * @capacity - 1
57
57
  end
58
58
 
59
- def resize(new_capacity)
60
- @capacity = new_capacity
59
+ def resize(new_cap)
60
+ @capacity = new_cap
61
61
 
62
62
  buffer = self.map { |key, value| [key, value] }
63
63
 
64
- create_table
64
+ @table = Array.new(@capacity)
65
65
  @size = 0
66
66
 
67
67
  buffer.each { |key, value| self[key] = value }
@@ -1,3 +1,3 @@
1
1
  module DataStructures101
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: data_structures_101
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - aegis
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-26 00:00:00.000000000 Z
11
+ date: 2017-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler