Skip to content
/ Arrays Public

Exercising Sum, Find Maximum, Remove Duplicates, Reverse Array and Array Rotation

Notifications You must be signed in to change notification settings

Sbhboi/Arrays

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Arrays

  1. Array Sum a. Write a method that takes an array of numbers and returns the sum of all the numbers in the array.
  2. Find Maximum a. Write a method that finds and returns the maximum value in an array of numbers.
  3. Remove Duplicates a. Write a method that takes an array and removes any duplicate elements, returning a new array with unique elements.
  4. Reverse Array a. Write a method that reverses an array in-place, without using built-in reverse methods.
  5. Array Rotation a. Write a method that rotates an array to the right by a specified number of positions.

Hashes

  1. Word Frequency Counter a. Write a method that takes a string and returns a hash where the keys are words in the string and the values are the frequencies of those words.
  2. Hash Merge a. Write a method that takes two hashes and merges them into a single hash, combining values for common keys.
  3. Hash Sorting a. Write a method that takes a hash and returns a new hash with the keys sorted alphabetically.
  4. Hash Inversion a. Write a method that inverts a hash, swapping keys and values.
  5. Hash Lookup a. Write a method that takes a hash and a key, and returns the value associated with that key. If the key is not found, return a default value.# Ticketing

Ticketing

About

Exercising Sum, Find Maximum, Remove Duplicates, Reverse Array and Array Rotation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages