Blog Posts

Find the Squares of a Sorted Array in Java

June 24, 2020

The challenge Given an array of integers A sorted in non-decreasing order, return an array of the squares of each number, also in sorted non-decreasing order.


Read More

Sorting a Java Array by Parity

June 23, 2020

The challenge Given an array A of non-negative integers, return an array consisting of all the even elements of A, followed by all the odd elements of A.


Read More

Remove Duplicates from Sorted Array in Java

June 22, 2020

Say you have an array of primitive integers and you want to remove all duplicates.


Read More

Replace Elements with Greatest Element on Right Side using Java

June 21, 2020

The challenge Given an array arr, replace every element in that array with the greatest element among the elements to its right, and replace the last element with -1.


Read More

The Valid Mountain Array Problem using Java

June 20, 2020

Introducing the problem Given an array A of integers, return true if and only if it is a valid mountain array.


Read More

HashMaps (aka: Dictionaries) in Python

June 19, 2020

Introduction Java has a built-in called HashMap. It allows you to store and very quickly retrieve key value pairs.


Read More

Find Numbers with Even Number of Digits using Java

June 18, 2020

The challenge Given an array nums of integers, return how many of them contain an even number of digits.


Read More

The Relational Database Model

June 17, 2020

Relational databases first made an appearance in the mid-1970s, between the years 1974 and 1977 with the creation of Ingres and System R which led to the creation of MS SQL Server, Sybase, Wang?


Read More

How to use a Java HashSet by example

June 16, 2020

What is a HashSet A HashSet is an unordered collection containing unique elements.


Read More

Get The Shortest Path in Binary Matrix using Python

June 15, 2020

The challenge In an N by N square grid, each cell is either empty (0) or blocked (1).


Read More

Palindrome Partitioning in Python

June 14, 2020

The problem Given a string s, partition s such that every substring of the partition is a palindrome.


Read More

Faster alternative to MySQL Delete Table Contents / Truncate

June 13, 2020

From time to time you might have some rather big tables that you want to delete all the data quickly and start afresh.


Read More

Best Time to Buy and Sell Stock with Python

June 12, 2020

The problem Say you have an array prices for which the ith element is the price of a given stock on day i.


Read More

IPv4 CIDR Chart

June 11, 2020

CIDR stands for Classless Inter-Domain Routing and is a method for allocating IP addresses as well as for IP routing.


Read More

Recursively Delete Files and Folders and all Contents using PHP

June 10, 2020

Below is a quick and easy way to recursively delete all files and folders in a given path using PHP.


Read More

Product Update: ADD becomes Serengeti

June 9, 2020

As a product update; The “Autonomous Distributed Database”, otherwise known as simply ADD has been renamed to Serengeti.


Read More

SQL to Append all Fields if Shorter than a set Length

June 8, 2020

This came in very handy for me at one point because I needed to have a certain field in each row 14 characters long, but half of them were only 12 characters long.


Read More

Validate Email Address in Javascript

June 7, 2020

Below is a nice little Javascript RegularExpression to validate email addresses.


Read More

Remove hash from window.location in Javascript

June 6, 2020

E.g. URL:<br>http://example.com/?option=1&task=2&listing_id=36&layout=4&table=5#some_hash_value_here So how would you get the current URL using Javascript?


Read More

The Benefits and Dangers of Artificial Intelligence

June 5, 2020

Artificial Intelligence (AI) is usually defined as the science of making computers do things that require intelligence when done by humans.


Read More