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++.
This post will discuss the XOR linked list, which is used to reduce memory requirements of doubly-linked lists using a bitwise XOR operator.
This post provides an overview of some available techniques to implement a linked list in C++ programming language.
The KMP Algorithm (or Knuth, Morris, and Pratt string searching algorithm) cleverly uses the previous comparison data. It can search for a pattern in linear time as it never re-compares a text symbol that has matched a pattern symbol.
Write an efficient program to convert a given number to words.
This post covers memory-efficient implementation of Trie data structure in C++ using the map data structure. Trie is a tree-based data structure, which is used for efficient retrieval of a key in a large dataset of strings.
Trie is a tree-based data structure used for efficient retrieval of a key in a huge set of strings. This post covers the C++ implementation of the Trie data structure, which supports insertion, deletion, and search operations.
Write an efficient algorithm to print a binary tree structure in standard output.
This post discusses std::prev_permutation, which can be used to find the lexicographically smaller permutations of a string.
This post discusses std::next_permutation, which can be used to find the lexicographically greater permutations of a string.
This post will find all permutations of a string containing all distinct characters in C++. For example, the string ABC has 6 permutations, i.e., ABC, ACB, BAC, BCA, CBA, CAB.