## Correctness and the Loop Invariant HackerRank Solution in C, C++, Java, Python

In the previous challenge, you wrote code to perform an Insertion Sort on an unsorted array. But how would you prove that the code is correct? I.e. how do you …

## Weather Observation Station 10 HackerRank SQL

Query the list of CITY names from STATION that do not end with vowels. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Weather Observation …

## Weather Observation Station 9 HackerRank Solution SQL

Query the list of CITY names from STATION that do not start with vowels. Your result cannot contain duplicates. Input Format The STATION table is described as follows: where LAT_N is the northern latitude and LONG_W is the western longitude. Weather Observation …

## The Love-Letter Mystery HackerRank Solution in C, C++, Java, Python

James found a love letter that his friend Harry has written to his girlfriend. James is a prankster, so he decides to meddle with the letter. He changes all the …

## Angry Professor HackerRank Solution in C, C++, Java, Python

A Discrete Mathematics professor has a class of students. Frustrated with their lack of discipline, the professor decides to cancel class if fewer than some number of students are present …

## Plus Minus HackerRank Solution in C, C++, Java, Python

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 6 …

## Simple Array Sum – HackerRank Solution in C, C++, Java, Python

Given an array of integers, find the sum of its elements. For example, if the array ar=[1,2,3] ,1+2+3=6, so return 6 . Function Description  Complete the simpleArraySum function in the editor …

## Closest Numbers HackerRank Solution in C, C++, Java, Python

Sorting is useful as the first step in many different tasks. The most common task is to make finding things easier, but there are other uses as well. In this …

## Super Reduced String HackerRank Solution in C, C++, Java, Python

Reduce a string of lowercase characters in range ascii[‘a’..’z’]by doing a series of operations. In each operation, select a pair of adjacent letters that match, and delete them. Delete as many …

## Chocolate Feast HackerRank Solution in C, C++, Java, Python

Little Bobby loves chocolate. He frequently goes to his favorite 5 & 10 store, Penny Auntie, to buy them. They are having a promotion at Penny Auntie. If Bobby saves …