In recent interviews Walmart has comeup with a good questions which are being asked for Online coding on hacker rank.
We have come up with coding algorithm & logic, so that it can be easy … Read More
Urban Ladder Written Test.
I have given Urban Ladder Online Test and my experience and questions are as below.
MCQ ROUND
Q1) An implementation of a queue Q, using two stacks S1 and S2, is given below:… Read More
Convert number to words java
Write a code to Convert number to words . example ip 15 op : fifteen
ip : 1234 op : one thousand and thirty four
Algorithm : When we detect a number at any place … Read More
FizzBuzz Solution C C++
Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples … Read More
Maximum path sum between two leaves
If a binary tree is given, how to find Maximum path sum between two leaves of binary tree.
All should be numbers The maximum sum path may or may not go through root. For example, |
Convert Decimal to Roman numbers / Romanizer HackerEarth Code
Set of Numbers are given to you.
convert them to Roman numbers.
Solution is in Hacker Earth style… Read More
There are N nuts and N bolts, u have to find all the pairs of nuts and bolts in minimum no. of iteration
With First look you think practical way of solving this question, and that is randomly taking a bolt and finding (by Looking at all nuts) perfect fit nut for it.
but does such logic to … Read More
Generic Object Oriented Stack with Template
Here We have implemented a Generic Stack Example with Templates in C++ where we can Push any element into stack.
#include <iostream>
#include <vector>
#include <cstdlib>
#include <string>
#include <stdexcept>
using namespace std;… Read More
C Program for TAIL command of UNIX
/*
* usage: myTail [-n] [<filename>]
*/
#include <stdio.h> #include <stdlib.h> #define MAX_LINE_LEN 1024 #define DEFAULT_N 10 int main(int argc, char *argv[]) { char **tail; int count = DEFAULT_N, n, i, headX = 0, tailX… Read More
Print Power Set of a Set
Print Power Set of a Set of character.
Power Set Power set P(S) of a set S is the set of all subsets of S. For example S = {a, b, c} then P(s) =