Python

Guide: Python, Getting Started With RestAPIs and Matplotlib


In order to pull data from a RestAPI in Python 3, you are going to need to use a module that is able to make requests to a given url. The appropriately named module that I typically use is called, "requests". This guide will actually pull data from a free ...

Read More

Hackerrank Solution: Computing the GCD


Given two integers, x and y, a recursive technique to find their GCD is the Euclidean Algorithm. The algorithm states that, for computing the GCD of two positive integers x and y, if x and y are equal, GCD(x, y) = x. Otherwise GCD(x, y) = GCD(x - y, y ...

Read More

Hackerrank Solution: Almost Sorted


Given an array with n elements, can you sort this array in ascending order using only one of the following operations? 1. Swap two elements. 2. Reverse one sub-segment. Input Format The first line contains a single integer, n, which indicates the size of the array. The next line contains ...

Read More