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 …
Read Article →323 articles about python development, tools, and best practices
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 →Python has never been the best at doing multiple things at the same time.
While there are ways to mostly resolve this, such as using the …
Read Article →Let’s say that you have an array or a list, or logs.
Each of these logs is a space-delimited string of words.
For example:
logs = ["dig1 8 …