Skip to content

3 Ruby programming exercises(in PDF format) are added in the Repo. I had to provide solutions to those exercises in Ruby.

Notifications You must be signed in to change notification settings

hasannadeem/digsite-coding-challenge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Digsite - Coding Exercises

Implemented coding exercises in ruby alongwith testcases using minitest.

Coding Exercise 1 (Bonus)

Provided two solutions. First one with using array manipulations. Second one with using hash. Results from benchmark-ips shows that the solution with hash was more time efficient, but it involves the usage of hash(extra space). On the other side, array manipulations solution involves the shortlisting of positive elements + sorting + uniq and it involves more time consumption.

Built With

  • Ruby v-2.6.0
  • Minitest
  • Benchmark-ips

How to Run Test Suite

Test cases are written using minitest Anyone who want to run it locally can use following process:

  1. Extract the zip file.
  2. Go to the tests directory i.e cd DigsiteChallenge/tests
  3. To run all the test cases use this:
    • bash driver.sh
  4. For running individual test cases for coding exercises, use this:
    • ruby code1_test.rb

About

3 Ruby programming exercises(in PDF format) are added in the Repo. I had to provide solutions to those exercises in Ruby.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published