Generate all permutations of given length such that every permutation has more or equal 1’s than 0’s in all prefixes of the permutation.
Category - C++ programming
Write code to find lexicographic minimum in a circular array, e.g. for the array BCABDADAB, the lexicographic minimum is ABBCABDAD.
C++ Programming - Construct an array from its pair-sum array - Algorithm - A pair-sum array for an array is array that contains sum of all pairs in ordered
C++ Programming - Program to evaluate simple expressions - Algorithm - string that represent an expression of digits and operands. E.g. 1+2*3, 1-2+4.
C++ Programming - Rearranged to form a palindrome - Algorithm - Given a string, if characters of the given string can be rearranged to form a palindrome.
C++ Programming - all pairs of anagrams - Algorithm - One simple idea to find whether all anagram pairs is to run two nested loops.
C++ Programming - Count of n digit numbers whose sum of digits equals to given sum - Dynamic Programming Given two integers ‘n’ and ‘sum’, find count of all
C++ Programming - Count number of binary strings without consecutive 1’s - Dynamic Programming Positive integer N, count all possible distinct binary string
C++ programming Eulerian path and circuit - undirected graph. Eulerian Path is a path in graph that visits every edge exactly once.
C++ Programming Inorder predecessor and successor for a given key in BST - I recently encountered with a question in an interview at e-commerce company.