What is Websocket? When we run a server side application, we run it on a particular physical port e.g. 8080, 8081. And to access the server side application, we use an IP. Similarly, when we log in to our browser and ask for a particular site, we send to the request our computer's IP as... Continue Reading →

Which is your favourite Gun in PUBG? Mine is this one in the picture below. Who will name this? SCAR-L! That's right. It needs 5.56 mm bullet and is pretty handy. More about SCAR-L here. But! let's ask our friends in Pochinki? Has someone got 4x zoom? Why? Because you know that the assault rifle... Continue Reading →

Introduction If you are new to string search, I would recommend to first read the brute force approach here. Brute force as discussed in the mentioned post has time complexity of O(mn) in worst case. Rabin-Karp also has the worst case time complexity of O(mn), but it has a much better time complexity of O(m... Continue Reading →

Introduction We have seen brute force approach to string search here. Brute force approach to string search has time complexity of O(n*m). Donald Knuth and Vaughan Pratt, and James H. Morris conceived the algorithm in 1970. KMP algorithm is the first algorithm to have linear time complexity. Problem Statement We will assume text (where we... Continue Reading →

Introduction CONTROL + F or COMMAND + F How often do you use above keyboard shortcut? In fact, for most of us, searching a string or substring in a pile of strings/document is involuntarily action with the above key combination. This post will deal with the subject of the substring search. We will quickly define... Continue Reading →

Introduction   Figure 1 shows a Binary Search Tree. This post will start with the motivation of studying BST and gradually move to the related definitions. We will do some hands on coding for simple BST operations and we will end the post by analysing the drawbacks. Where do we use Binary Search Tree? Trees... Continue Reading →

Priyanshi and I  had conducted a series of three online lectures for those who want to learn Java. These presentation were made for a beginner with no prior knowledge of java. Lectures were supported by online tests and a small project to get hands on knowledge. Please find the presentations that will help in jumpstarting the... Continue Reading →

What can a badly designed database do? Anyone whose bread and butter comes from database seldom underestimates database performance. But Paulo Cohelo said in veronica decides to die that, People never learn anything by being told, they have to find out for themselves. Echoing the similar sentiments, I was happily having breakfast, lunch and dinner until one... Continue Reading →

PrerequisiteA basic understanding about Apache Kafka. Please go through the introduction once, should you need it.InstallationDownload the Kafka from here.Untar the tar file that is downloaded.tar -xzf kafka_2.11-2.1.0.tgzRun The Servercd kafka_2.11-2.1.0Start the zookeeper firstbin/zookeeper-server-start.sh config/zookeeper.propertiesZookeeper would be running at 2181 port. You can check that in the following log:[2018-12-25 14:32:23,634] INFO binding to port 0.0.0.0/0.0.0.0:2181... Continue Reading →