Abrar Hussain

Application Graph Traversal

When you’re trying to perform automation on an application, if there’s only certain end-points that you’re checking (with many intermediate states that you need to visit), it may be helpful to represent the application as a state graph. That way, you can shorten the amount of code that’s required for moving between end states. In this post, we’re going to explore why that idea may be useful - as well as go through a small sample demonstrating the approach.

Problem: Closest Pair

Given an input string vector, find the distance between the closest pair of equal value entries.

Python Partials

When I was looking through some Kivy code, I came through an example where Python partials were used. Although I’ve read about partials in the docs, I’ve never used them in my code. The official docs say:

Problem: Array Single Value Appears Twice

You are given a read only array of n integers from 1 to n. Each integer appears exactly once except A which appears twice and B which is missing. Return A and B.