Frequency of occurrence

Given an sequence of integers, return the integer that occurs the most and its frequency of occurrence, as well as the integer that occurs the median number of times and it’s frequency.   For example [5,1,1,3,3,3] would have the number 3 occurring 3 times (mode) and would have the number 1 occurring 2 times which ...

Money Collection

Mr.savani is collecting a money from n students for a trip,  like collect $1 from 1st student, $3 from 3rd student and so on.. but it should not include k (unlucky number) into sum. if it includes k into sum, then ignore that student   Example: n = number of student, k = unlucky number ...

How to use Geolocalise gem

Welcome to Geolocalise gem! A Gem which help you to find out current city,state,country,postal-code and country-code with simple methods call. Links: Github link : Geolocalise RubyGem link : Geolocalise Installation Add this line to your application’s Gemfile: gem \'geolocalise\' And then execute: $ bundle Or install it yourself as: $ gem install geolocalise Usage In ...

Important ruby gem list

To Create admin panel: ActiveAdmin :  rubygem | github Activeadmin-axlsx :    rubygem | github AES encryption / decryption Ruby gem Aescrypt : rubygem | github Mailing Functionality: Letter Opener : rubygem | github Calculate difference between two given time: Time Diff : rubygem | github Time Difference : rubygem | github To check the quality of rails code: Rails best practices ...