## Java Program for n-th Fibonacci numbers

In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation Fn = Fn-1 + Fn-2 with seed values F0 =… Read More »

## C/C++ Program for n-th Fibonacci number

In mathematical terms, the sequence Fn of Fibonacci numbers is defined by the recurrence relation Fn = Fn-1 + Fn-2 with seed values F0 =… Read More »

## Program for Fibonacci numbers

The Fibonacci numbers are the numbers in the following integer sequence. 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ……..… Read More »

## Applications of Minimum Spanning Tree Problem

Minimum Spanning Tree (MST) problem: Given connected graph G with positive edge weights, find a min weight set of edges that connects all of the… Read More »

## Print BST keys in the given range

Given two values k1 and k2 (where k1 < k2) and a root pointer to a Binary Search Tree. Print all the keys of tree… Read More »

## Lower bound for comparison based sorting algorithms

The problem of sorting can be viewed as following. Input: A sequence of n numbers <a1, a2, . . . , an>. Output: A permutation… Read More »

## Applications of Queue Data Structure

Queue is used when things don’t have to be processed immediately, but have to be processed in First In First Out order like Breadth First… Read More »

## Print Ancestors of a given node in Binary Tree

Given a Binary Tree and a key, write a function that prints all the ancestors of the key in the given binary tree. For example,… Read More »

## Get Level of a node in a Binary Tree

Given a Binary Tree and a key, write a function that returns level of the key. For example, consider the following tree. If the input… Read More »

## Sorted insert for circular linked list

Difficulty Level: Rookie Write a C function to insert a new value in a sorted Circular Linked List (CLL). For example, if the input CLL… Read More »

## Advanced C++ | Conversion Operators

In C++, the programmer abstracts real world objects using classes as concrete types. Sometimes it is required to convert one concrete type to another concrete… Read More »

## Program to compute Log n

Write a one line C function that calculates and returns . For example, if n = 64, then your function should return 6, and if… Read More »

## OOD Principles | SOLID

Object Oriented Programming paradigm deals with centralizing data and associated behaviours in a single entity. The entities will communicate by message passing. The high level… Read More »

## C++ default constructor | Built-in types

Predict the output of following program? filter_none edit close play_arrow link brightness_4 code #include <iostream> using namespace std;    int main() {       cout <<… Read More »

## Functions that cannot be overloaded in C++

In C++, following function declarations cannot be overloaded. 1) Function declarations that differ only in the return type. For example, the following program fails in… Read More »