Hackerrank – Java Stdin and Stdout 1

Problem Statement A description of the problem can be found on Hackerrank. Solution Repeat reading int from scanner as in example for 2 another variables Again print 2 new variables to standard output as example with variable a. I created solution in: Java All solutions are also available on my GitHub. Java

Hackerrank – Is Fibo

Problem Statement A description of the problem can be found on Hackerrank. Solution Create Fibonacci sequence and check if the actual Fibonacci number is equals number n. Stop the sequence if actual Fibonacci number is greater then n. I created solution in: Java JavaScript Scala Ruby All solutions are also available on my GitHub. Java […]

Hackerrank – IP Address Validation

Problem Statement A description of the problem can be found on Hackerrank. Solution IP4 regex: \b(((2[0-5][0-5])|(1[0-9][0-9])|(\b[1-9][0-9]\b)|(\b\d\b))\.){3}((2[0-5][0-5])|(1[0-9][0-9])|(\b[1-9][0-9]\b)|(\b\d\b))\b IP6 regex: ([a-f0-9]{1,4}:){7}\b[0-9a-f]{1,4}\b I created solution in: Java JavaScript Scala Ruby All solutions are also available on my GitHub. Java

JavaScript

Scala

Ruby

Hackerrank – Intro to Tutorial Challenges

Problem Statement A description of the problem can be found on Hackerrank. Solution Check all array elements if one of them is equal to required value. Then print its index to the output. I created solution in: Java JavaScript Scala Ruby All solutions are also available on my GitHub. Java

JavaScript

Scala

[…]

Hackerrank – Insertion Sort – Part 1

Problem Statement A description of the problem can be found on Hackerrank. Solution Assign to auxiliary variable the last element of the array. Iterate from last element to 0th. If an actual element is lower than auxiliary, assign auxiliary to actual index, else switch actual element with last actual. I created solution in: Java JavaScript […]

Hackerrank – Ice Cream Parlor

Problem Statement A description of the problem can be found on Hackerrank. Solution For each ith price, check if ith price plus (i+1)th price is equal required amount. I created solution in: Java JavaScript Scala Ruby All solutions are also available on my GitHub. Java

JavaScript

Scala

Ruby

Hackerrank – Weather Observation Station 5

Problem Statement A description of the problem can be found on Hackerrank. Solution 2 queries: One that selects cities that are ordered by city length ascending and printed first row containing city and its length. Second is almost the same as first but cities are ordered descending. In both queries I used second ordering by […]

Hackerrank – Weather Observation Station 6

Problem Statement A description of the problem can be found on Hackerrank. Solution Check if city starts with one of (‘a’, ‘i’, ‘e’, ‘o’, ‘u’) and orders them alphabetically. I created solution in: SQL All solutions are also available on my GitHub. SQL

Hackerrank – Weather Observation Station 7

Problem Statement A description of the problem can be found on Hackerrank. Solution Almost the same principle as Weather Observation Station 6, only substring is different. I created solution in: SQL All solutions are also available on my GitHub. SQL

Hackerrank – Weather Observation Station 8

Problem Statement A description of the problem can be found on Hackerrank. Solution Joins conditions of Weather Observation Station 6 and Weather Observation Station 7 I created solution in: SQL All solutions are also available on my GitHub. SQL