This is a short post but the problems were still pretty fun! Types of Triangles: Given the table of triangles, sides find if a triangle is possible. If so then find the type of triangle …


SQL Saturday

SQL Saturday
SQL Saturday Query the list of CITY names starting with vowels (i.e., a, e, i, o, or u) from STATION. Your result cannot contain duplicates. SELECT DISTINCT CITY FROM STATION WHERE City like “A%” or …

Fun with Select Queries
Query all columns for all American cities in CITY with populations larger than 100000. The CountryCode for America is USA. Input Format The CITY table is described as follows: SELECT * /*Selects all columns from …

Electronics Shop
This Hackerrank problem deals with combinations. The problem: import sys def getMoneySpent(keyboards, drives, s): combo = 1 for k in keyboards: for d in drives: if (k+d) > combo and (k+d) <= s: combo = …

The Day of the Programmer
This Hackerrank problem asks you given the year, the 256 date of that year according to the Russian Calendar. The Code: import sys def solve(year): months = [31,28,31,30,31,30,31,31] if year > 1918: if year%400 …

Kangaroo
This is another easy Hackerrank question, Kangaroo. This problem takes a high school math problem of will one car ever catch another, but instead of cars we are talking kangaroos def kangaroo(x1, v1, x2, v2): …

Apple and Orange
I have been applying to different internships lately and have been referred to hackerrank through many of them so I decided why not add and talk about my solutions to some of the challenges. This …