Featured Article

How Google Search Works!

The Google Search: It happens billions of times a day in the blink of an eye and we can have anything before us our minds can think of! Let’s explore the art and science that makes it possible. Crawling & Indexing: The journey of a query starts before we ever type a search, with crawling… Read More »

Featured Article

K-Nearest Neighbours

K-Nearest Neighbours is one of the most basic yet essential classification algorithms in Machine Learning. It belongs to the supervised learning domain and finds intense application in pattern recognition, data mining and intrusion detection. It is widely disposable in real-life scenarios since it is non-parametric, meaning, it does not make any underlying assumptions about the… Read More »

LZW (Lempel–Ziv–Welch) Compression technique

Left to right: Abraham Lempel, Jacob Ziv & Terry Welch source Why do we need Compression Algorithm ? There are two categories of compression techniques, lossy and lossless. Whilst each uses different techniques to compress files, both have the same aim: To look for duplicate data in the graphic (GIF for LZW) and use a… Read More »

Print colored message with different font and size in C

In C/C++ we can use graphics.h header file for creation of programs which uses graphical functions like creating different objects, setting the color of text, printing messages in different fonts and size, changing the background of our output console and much more. Here we will create a program which will print message (“geeks”) in colored… Read More »

How to generate spring XMP configuration files programmatically ?

Problem statement As we all know, in a spring application we provide configuration information through ‘ApplicationContext’. There are multiple classes provided by spring framework that implements this interface and helps us use configuration information in applications, and ClassPathXmlApplicationContext is one among them. Usually in this case all the bean definitions are configured in a single… Read More »

typedef versus #define in C

typedef : typedef is used to give data type a new name, for example Output : c #define : is a C directive which is used to #define alias. Output : Hyderabad typedef is different from #define among the following aspects typedef is limited to giving symbolic names to types only, where as #define can… Read More »

Output of Java Program | Set 10

Predict the output of following Java programs: Question 1 : a) 6 b) 5 c) Compile time error d) Run time error Answer (c) Explanation: When overriding a method of superclass, the method declaration in subclass cannot be more restrictive than that declared in the superclass. Question 2 : a) Either Compile time or Runtime… Read More »

Enum with Customized Value in Java

Prerequisite : enum in Java By default enums have their own string values, we can also assign some custom values to enums. Consider below example for that. Examples: enum Fruits { APPLE(“RED”), BANANA(“YELLOW”), GRAPES(“GREEN”); } In above example we can see that the Fruits enum have three members i.e APPLE, BANANA and ORANGE with have… Read More »

Temple Offerings

Consider a devotee wishing to give offerings to temples along a mountain range. The temples are located in a row at different heights. Each temple should receive at least one offering. If two adjacent temples are at different altitudes, then the temple that is higher up should receive more offerings than the one that is… Read More »