Skip to content

Latest commit

 

History

History
11 lines (10 loc) · 699 Bytes

README.md

File metadata and controls

11 lines (10 loc) · 699 Bytes

hackerank-java

Task 1

Given an array of integers, calculate the ratios of its elements that are positive, negative, and zero. Print the decimal value of each fraction on a new line with places after the decimal.

Task 2

Given five positive integers, find the minimum and maximum values that can be calculated by summing exactly four of the five integers. Then print the respective minimum and maximum values as a single line of two space-separated long integers.

Task 3

Given a time in -hour AM/PM format, convert it to military (24-hour) time.

Note:

  • 12:00:00AM on a 12-hour clock is 00:00:00 on a 24-hour clock.
  • 12:00:00PM on a 12-hour clock is 12:00:00 on a 24-hour clock.