Skip to content
Gblog Geek Week 2021 – The Biggest Festival For Programmers
The month of October brings along with itself festive vibes, good food & so many holidays too! Add to all that, a bit of geeky-ness.… Read More
Given a number n, count number of n length strings with consecutive 1’s in them. Examples:  Input : n = 2 Output : 1 There… Read More
What is Laravel ? Laravel is a web application framework created by Taylor Otwell in 2011 and like all other modern frameworks, it also follows… Read More
Many programming contest problems are somehow related Prime Numbers. Either we are required to check Prime Numbers, or we are asked to perform certain functions… Read More
Question: Ticket Scalpers: Given an array of tickets held by n scalpers. The cost of a ticket at the scalper is equal to the number… Read More
java.util.Scanner class is a simple text scanner which can parse primitive types and strings. It internally uses regular expressions to read different types.   Java.io.BufferedReader… Read More
It is recommended to refer Interesting facts about Bitwise Operators as a prerequisite.1. How to set a bit in the number ‘num’ :If we want… Read More
Branch and bound is an algorithm design paradigm which is generally used for solving combinatorial optimization problems. These problems typically exponential in terms of time… Read More
We have discussed Pizza design problem and different naive approaches to solve it in set 1. We have also introduced Decorator pattern in Set 2.… Read More
The most common tools to save time in C/C++ are typedefs and macros. Unfortunately, these features are not available in many other languages like Java.… Read More
As we saw our previous designs using inheritance didn’t work out that well. In this article, decorator pattern is discussed for the design problem in… Read More
Hey guys, a pool campus drive for North-East India has been conducted by SAP Labs India in Guwahati, Assam. The selection process is divided into… Read More
To understand decorator pattern let us consider a scenario inspired from the book “Head First Design Pattern”.  Suppose we are building an application for a… Read More
NOTE: Using an online compiler is not going to work here. Please install Python 2.7x and cv2, argparse modules to actually try out this example.… Read More
There are 20 people standing in a line, one behind the other. Each is made to wear a hat, which can either be white or… Read More
We are given an excel sheet which contains integers from 1 to 50, including both. However, the numbers are in a jumbled form and there… Read More