One Interesting Code Challenge from Leetcode: finding anagrams in a string

In my coding interviews I often use a simplified version of this challenge from Leetcode. The simplified version I use: Given two strings s and p, return true if s contains an anagram for p. I like this task because the solution and be improved little by little and there are a lot things to discuss. From algorithmic complexity to CPU cache level optimization. Here I want to walk you through how I solved that challenge for the first time. ...

May 29, 2022 · 9 min · Anton Golubtsov