## The Valid Mountain Array Problem using Java

Introducing the problem Given an array A of integers, return true if and only if it is a valid mountain array. Recall that A is a mountain array if and… Read More »The Valid Mountain Array Problem using Java

## HashMaps (aka: Dictionaries) in Python

Introduction Java has a built-in called HashMap. It allows you to store and very quickly retrieve key value pairs. In Python, this is called a… Read More »HashMaps (aka: Dictionaries) in Python

## Find Numbers with Even Number of Digits using Java

The challenge Given an array nums of integers, return how many of them contain an even number of digits. Example 1: Input: nums = [12,345,2,6,7896] Output: 2 Explanation: 12… Read More »Find Numbers with Even Number of Digits using Java

## The Relational Database Model

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… Read More »The Relational Database Model

## How to use a Java HashSet by example

What is a HashSet A HashSet is an unordered collection containing unique elements. It has the standard collection operations Add, Remove, Contains, but since it… Read More »How to use a Java HashSet by example

## Get The Shortest Path in Binary Matrix using Python

The challenge In an N by N square grid, each cell is either empty (0) or blocked (1). A clear path from top-left to bottom-right has length k if and… Read More »Get The Shortest Path in Binary Matrix using Python

## Palindrome Partitioning in Python

The problem Given a string s, partition s such that every substring of the partition is a palindrome. Return all possible palindrome partitioning of s. Example: Input: “aab” Output: [… Read More »Palindrome Partitioning in Python

## Best Time to Buy and Sell Stock with Python

The problem Say you have an array prices for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum… Read More »Best Time to Buy and Sell Stock with Python

## IPv4 CIDR Chart

CIDR stands for Classless Inter-Domain Routing and is a method for allocating IP addresses as well as for IP routing. It was introduced in 1993… Read More »IPv4 CIDR Chart

## Recursively Delete Files and Folders and all Contents using PHP

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

## Product Update: ADD becomes Serengeti

As a product update; The “Autonomous Distributed Database”, otherwise known as simply ADD has been renamed to Serengeti. The Serengeti is a vast ecosystem in east-central Africa.… Read More »Product Update: ADD becomes Serengeti

## Validate Email Address in Javascript

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

## Remove hash from window.location in Javascript

E.g. URL: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? That is really easy, you can use window.location.href or just simply window.location. But… Read More »Remove hash from window.location in Javascript

## The Benefits and Dangers of Artificial Intelligence

Artificial Intelligence (AI) is usually defined as the science of making computers do things that require intelligence when done by humans. (Jack Copeland, 2000) Current… Read More »The Benefits and Dangers of Artificial Intelligence

## The Decoded String at Index using Java

The Challenge An encoded string S is given.  To find and write the decoded string to a tape, the encoded string is read one character at a time and the following… Read More »The Decoded String at Index using Java

## Timing Issues in Real-time systems

What are Real-time Systems? If you look up the term “real-time” in a dictionary, it will tell you that it is the actual time during… Read More »Timing Issues in Real-time systems

## Find the Minimum Absolute Difference in BST using Java

The question Given a binary search tree with non-negative values, find the minimum absolute difference between values of any two nodes. Example: Input: 1 \ 3 /… Read More »Find the Minimum Absolute Difference in BST using Java

## Get the Second Highest Salary in MySQL

The problem Write a SQL query to get the second highest salary from the Employee table. +—-+——–+ | Id | Salary | +—-+——–+ | 1 | 100… Read More »Get the Second Highest Salary in MySQL

## Find Maximum Subarrays using Java

The problem Given an integer array nums, find the contiguous subarray (containing at least one number) which has the largest sum and return its sum. Example: Input:… Read More »Find Maximum Subarrays using Java

## Finding Number Complements using Java

The problem Given a positive integer num, output its complement number. The complement strategy is to flip the bits of its binary representation. Example 1: Input: num =… Read More »Finding Number Complements using Java

## Forensic Analysis on Linux (Unix)

Operating Systems come in a few competing choices, of which the major players are Apple’s MacOS, Microsoft’s Windows and then the various flavours of Linux,… Read More »Forensic Analysis on Linux (Unix)

## Self Dividing Numbers using Python

Introduction A self-dividing number is a number that is divisible by every digit it contains. For example, 128 is a self-dividing number because 128 % 1 == 0, 128… Read More »Self Dividing Numbers using Python