#Bluewolf Assignment - Tier 1
Write a function in the programming language of yoru choice to solve the following problems. Each function MUST be accompanied by positive and negative unit tests.
-
Given an array with 1,000,000 integers between 1 and 1,000,000, one integer is in the array twice. Find the duplicate.
-
Find the first non-repeating character in a string: ("DEFD" -> E)
Installation
Dependencies
Use bundle install
to install dependencies.
Tests
Run the tests with rspec bluewolf_spec.rb
Program
Start the program with ruby bluewolf.rb
. Either uncomment out the puts
statements or include this file in IRB to use the methods.