Print binary representation of a number – C, C++, Java, and Python
Print binary representation of a given number in C, C++, Java, and Python using built-in methods and custom routines.
Ace your Coding Interview
Get hired by top tech companies with our comprehensive interview preparation.
Get StartedPrint binary representation of a given number in C, C++, Java, and Python using built-in methods and custom routines.
This post will discuss how to reverse an array in C++.
Given a string, print it backwards using recursion.
A stack is a linear data structure that follows the LIFO (Last–In, First–Out) principle. That means the objects can be inserted or removed only at one end of it, also called a top.
Sieve of Eratosthenes is an efficient algorithm that can be used in most coding competitions involving prime numbers in the range of a given number n.
Write a program to calculate the nth Fibonacci number where n is a given positive number. Fibonacci’s sequence is characterized by the fact that every number after the first two is the sum of the two preceding ones.
This article covers queue implementation in Java. A queue is a linear data structure which follows the FIFO (first-in first-out) principle. That means the object which is inserted first will be the first one out, followed by the object which was inserted next.
This article will provide C++ implementation of a queue data structure using templates in C++. This article will make the class code generic by using C++ templates to support all data types.
This article covers queue implementation in C++. A queue is a linear data structure that serves as a container of objects that are inserted and removed according to the FIFO (First–In, First–Out) principle.
In this article, we will discuss the C++ implementation of the stack data structure using classes and make code generic for all data types by using C++ templates.
In this article, C++ implementation of stack data structure is discussed using a class. A stack is a linear data structure that serves as a container of objects that are inserted and removed according to the LIFO (Last–In, First–Out) rule.
This article covers queue implementation using a linked list. A queue is a linear data structure that serves as a collection of elements, with three main operations: enqueue, dequeue and peek.