Category: algorithm

Codeforces Problem: Azamon Web Services: Solution in Python

Problem Given two string, find if using max one swap of characters, the first string is lexicographically smaller than the other string. Solution The logic is as follows: Create an index map of each character in the string A. Compare String A & String B, character-by-character. If characters are the same, move to the next character. If char ‘c’ in…

Lambda Architecture & Heavy Hitters

I came across an interesting video on Finding top K heavy hitters. The solution with Lambda Architecture seems intriguing. Things to Note Lambda Architecture uses a fast path and a slow path. Slow path is used for batch processing. Fast path is used for in-memory processing. Variation Most treding products Most traded stocks DDoS References https://www.codeproject.com/Articles/1171443/Applying-Lambda-Architecture-on-Azure https://www.youtube.com/watch?v=kx-XDoPjoHw Written with StackEdit.