Skip to content

W3 Spot

  • Blog Disclaimer

admin

Find Pattern And Its Anagrams In A Text

June 4, 2022July 28, 2020 by admin

We will be solving here a LeetCode problem. The problem is to find a pattern & all its anagrams in a String. You will find similar problem in InterviewBit or GeeksforGeeks too. Problem: Given two strings s and p, return an array of all the start indices of p’s anagrams in s. You may return … Read more

Categories Pattern Matching Algorithm Leave a comment

How Asynchronous Ajax Calls Get Executed In JavaScript Event Loop

May 31, 2022July 27, 2020 by admin

We know JavaScript is single threaded. And we know it uses event loop architecture. Event loop runs in a single thread & executes code. There are tons of articles out there regarding this. So without going into same thing again, I want to touch upon a follow up topic on this. If event loop runs … Read more

Categories Concurrency Leave a comment

KMP Algorithm Explained In Plain English

October 21, 2023July 27, 2020 by admin

Here I am just trying to explain KMP algorithm in plain english. I will also explain worst time complexity & why it is O(m + n). We will take two examples, one with no repeatable character in the pattern & another with repeatable characters in the pattern. Pattern With Repeatable Characters: Text: aaaabaabab Pattern: aaaaa … Read more

Categories Pattern Matching Algorithm Leave a comment

Simple Explanation Of Rabin-Karp Pattern Matching Algorithm

December 1, 2021July 26, 2020 by admin

In this post, I will try to explain Rabin-Karp algorithm & its worst time complexity. Rabin-Karp algorithm is based on hash matching.   Let’s take an example. Text: aadabcPattern: abc   Let’s create a table as below & represent each letter with some arbitrary number. We will use it to calculate hash. a b c … Read more

Categories Pattern Matching Algorithm Leave a comment
Newer posts
← Previous Page1 … Page9 Page10

© 2025 W3 Spot • Built with GeneratePress