Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Added Set to Types #7

Merged
merged 5 commits into from
Aug 7, 2018
Merged

Added Set to Types #7

merged 5 commits into from
Aug 7, 2018

Conversation

kasvith
Copy link
Owner

@kasvith kasvith commented Aug 7, 2018

Pull Request for issue #6

Description

Added Set Data structure.
The underlying DS is a Map data structure

Capabilities

  • New - Creates a new set
  • NewFromSlice - Create a new set from a given string slice
  • Add - Adds items to a set
  • Card - Cardinality of the set
  • Elems - Get all elements of the set
  • Diff - Set difference given as a slice of strings
  • DiffS - Set difference given as a Set
  • Exists - Check a given element exists on the set
  • Delete - Delete elements from the set
  • Intersection - Intersection the sets and return a slice of string
  • IntersectionS - Intersection the sets and return a set
  • Union - Get the union of given sets, a string slice returned
  • UnionS - Get the union of given sets, a Set returned
  • Move - Move an element from one set to another

Testing Instructions

  • Run go test ./...

Additional Comments

  • Need to implement Pop and RandomElement

@kasvith kasvith added the feature label Aug 7, 2018
@kasvith kasvith added this to the First Release milestone Aug 7, 2018
@kasvith kasvith self-assigned this Aug 7, 2018
@kasvith kasvith added this to In progress in Creating types via automation Aug 7, 2018
@codecov
Copy link

codecov bot commented Aug 7, 2018

Codecov Report

Merging #7 into master will increase coverage by 0.3%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master       #7     +/-   ##
=========================================
+ Coverage   99.13%   99.43%   +0.3%     
=========================================
  Files           2        3      +1     
  Lines         230      353    +123     
=========================================
+ Hits          228      351    +123     
  Misses          2        2
Impacted Files Coverage Δ
internal/types/set/set.go 100% <100%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 957e399...171daf1. Read the comment docs.

@kasvith kasvith merged commit 298ac74 into master Aug 7, 2018
Creating types automation moved this from In progress to Done Aug 7, 2018
@kasvith kasvith deleted the types/set branch August 7, 2018 09:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant