Latest Discussions

Topic — Add New » Posts Last Poster Freshness
Largest Palindrome in a string 20 PsychoCoder 14 hours

How to find the largest palindrome in the string??

Tree Helical order traversal 2 kartik 15 hours

Any body, give a program / logic to traverse a tree in helical order

ex:
tree:
...

Precedence 5 avdd80 16 hours

Please explain the associativity and order of execution in this statement
b= a + ++b + (a-b);
() has the highest precedence. but a-b is...

Amazon Banglore Online Written 5 javanetbeans 16 hours

You are given a function printKDistanceNodes which takes in a root node of a binary tree, a start node and an integer K. Complete the function to p...

Permutations of a string without repeatition 9 agrawal25 1 day

How to find all the permutations of a string such that two equal permutations appear only once.
That is all permutations should be unique

Binar Tree to Double Linked List (circular) Conversion 1 kasireddi 2 days
struct node {
   int data;
   struct node* left;
   struct node* right;
};
typedef struct node* Node;  

//root: Current tree node
//prev: this p...
inheritance 4 vikram.kuruguntla 4 days

implementing stacks and queues using inheritance from linked list???

TIME COMPLEXITY PROBLEM 2 kartik 6 days

What will be the time complexity T(n) and space complexity S(n) of the following Algorithm?
How can we build a recursion tree for the same?

Linked List 4 vikram.kuruguntla 6 days

Given a linked list as follows:
a->b->c->1->2->3
Arrange it in a manner it would return
a->1->b->2->c-...

value substitution 3 vikram.kuruguntla 6 days

This statement swaps the values in a and b :
b=a+b-(a=b);
can anyone plz explain the steps involved in the execution of this statement....

Reverse a linked list every "given num" nodes 2 kartik 1 week

Input (num = 3)
1 -> 2 -> 3 -> 4 -> 5 -> 6 -> 7 -> 8 -> 9 -> 10

Output
3 -> 2 -> 1 -> 6 -&g...

Amazon Banglore Online Written 4 vikram.kuruguntla 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].

FB HACKER CUP QUESTION 1 geekologic 1 week

You are racing on a 2D lattice grid starting from the origin (0,0) towards a goal (M,N) where M and N are positive integers such that 0 < M <...

sorting 2 kartik 1 week

Q. write an algorithm to sort the n element of an array having element 1 to n , without using extra static variable ,global variable ,any extra spa...

Output of C program 3 PINTUGUPTAJUIT 1 week
#include<stdio.h>

int main()
{
  int i, j;
  int arr[4][4] = { {1, 2, 3, 4},
                    {5, 6, 7, 8},
                    {9, 10...
Array - all 1s 1 k53 1 week

The elements of an array are 1s and 0s. Change all the elements of this array as 1.
Use only a single statement and do not use any operator o...

Amazon Banglore Online Written 2 kartik 1 week

Given a single linked list with an additional pointer to a random node (which can also be NULL), clone the list and return it.

Example:

...

Forums

Main Theme Topics Posts
Interview Questions 3,758 11,068
C/C++ Programming Questions 589 1,600
Algorithms 334 1,048
Trees specific questions 88 331
Linked List specific questions 49 176
Multiple Choice Questions 36 94
Object oriented queries 25 89
GPuzzles 49 262
Operating Systems 34 98
Miscellaneous 161 369
Java specific Questions 63 157
Perl specific Questions 8 16