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 Article →403 articles about python development, tools, and best practices
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 Article →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 …
Given a string s, partition s such that every substring of the partition is a palindrome.
Return all possible palindrome partitioning of s …
Read Article →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 Article →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 % …
Today I got a really dumb error from Python.
RuntimeError: thread.init() not called
But luckily it’s really easy to fix!
Below is the code …
Read Article →All dates in your server applications should be stored in the UTC timezone.
This is because you always want to store time without the offset of the …
Read Article →The requests
module for Python is very useful in helping simplify HTTP/s requests from Python, but how would you use it in an AWS Lambda script? …
Given an array of strings arr
. String s
is a concatenation of a sub-sequence of arr
which have unique characters.
Return the maximum …
Read Article →Let’s say that you have a Python list with the following 5 foods:
foods = ["pizza", "pasta", "steak", "chicken", …
Read Article →
This is not the first time that I created a Python3 application that spat out some output and required access to it via an HTTP server.
While there …
Read Article →Given a fixed length array arr
of integers, duplicate each occurrence of zero, shifting the remaining elements to the right.
Note that elements beyond …
Read Article →