Use Notepad++ As Offline JSON Validator

As software developers we encounter JSON format frequently, especially if we are into developing web apps. It is a common format for REST API payload. Or there are NoSQL databases like MongoDB which store JSON documents. Parsing & figuring out details from large JSON documents is a regular thing. How do we generally do that? … Read more

Difference Between Wait And Park Methods In Java Thread

If you are familiar with thread dump or at least looked at it couple of times, probably you would have noticed WAITING  & WAITING (parking) states. So what’s the difference? In Java, we have Object.wait() and Unsafe.park() methods. Both of them will suspend the running thread & put it in waiting state. But these two methods work on different principles. Object.wait() results in WAITING state whereas Unsafe.park() method … Read more

KMP Algorithm Explained In Plain English

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