Latest Discussions

Topic — Add New » Posts Last Poster Freshness
Finding an maximum weighted non-overlapping interval subset 2 kartik 10 hours

Let '[b]S[/b]' be a set denoting a set of '[b]n[/b]' intervals {i(1),i(2),...,i(n-1),i(n)}. Given starting time and ending time of each interval {(...

Find the two nodes in Binary Tree which have longest distance between them. 2 kartik 1 day

Find the two nodes in Binary Tree which have longest distance between them.
i know its somewhere analogous to finding the diameter but then t...

Can anyone please explain the following shell sort program??? 1 kirthu 2 days
void shellsort(int a[],int array_size) {
int i,j,incr,temp;
incr=3;
while(incr>0)
{
    for(i=0;i<array_size;i++) {
           j=i;
       ...
Finding the Longest Increasing Sub-sequence in an Array 5 Venki 4 days

[b]Write A program to find the longest Increasing Sub-sequence in an Array. In sub-sequence, elements may not be contiguous, but these should be in...

interview question 5 spandan 4 days

Suppose that in addition to being sorted, the entries of A are distinct integers. Design an efficient algorithm for finding an index i such that A[...

Add two Numbers 3 spandan 5 days

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a sing...

Amazon Interview Question Password Checker 8 atul007 6 days

Given a string tell whether its a valid passwd or not.
Other rules are simple but the third one is tricky:
* the string should not have...

find all increasing subsequences 4 asm 6 days

given an array of integers, we need to find all strictly increasing subsequences in this array.
A subsequence can start at any element and en...

Find majority Element using Divide and Conquer Algorithm 2 Venki 6 days

I want to use Divide and Conquer algorithm for finidng Majority Candidate from an Array.
Can any let me know how todo that ? Or Can any one g...

Binary Tree to BST 15 varadharajan 1 week

convert a binary tree to binary search tree inplace. We cant use any extra space.

Java 1 h.vijayganesh 1 week

What is @override annotation in java? what it will do?

Amazon Banglore Online Written 6 asm 1 week

In given array of elements like [a1,a2,a3,..an,b1,b2,b3,..bn,c1,c2,c3,...cn] Write a program to merge them like [a1,b1,c1,a2,b2,c2,...an,bn,cn].

verbal arithmetic 4 asm 1 week

also known as cryptarithmetic is a type of puzzle where you have to assign digits to alphabets such that no two alphabets get the same digits.only ...

numeric puzzle 4 asm 1 week

given 3 strings X, Y and Z. Find all solutions to a numeric puzzle: X + Y = Z where
each character in a string corresponds to some digit (not...

Ancestor of two given leaf nodes 7 dead 1 week

Determine the first common ancestor of twi given leaf nodes in Binary Tree.

Finding The Median 1 krishnan 1 week

How to find the median of an array of integers using Heaps

sequence points 3 Venki 2 weeks

int a=4,b=5;
int x=++a*++a*++a;
int y=++a*++b*++b;
printf("%d,%d",x,y);

Please explain each step??

Forums

Main Theme Topics Posts
Interview Questions 3,844 11,663
C/C++ Programming Questions 618 1,684
Algorithms 367 1,155
Trees specific questions 93 350
Linked List specific questions 51 198
Multiple Choice Questions 36 95
Object oriented queries 25 89
GPuzzles 49 276
Operating Systems 43 121
Miscellaneous 165 379
Java specific Questions 63 163
Perl specific Questions 8 16