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

How to find the largest palindrome in the string??

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

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?

Large(n)
{
        If(n<=1)
              Return n;'
         Sum = 0;
         For i= 1 To n-1
               Sum = Sum + Large(i);
         Return Sum;
}
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->3
Note:list contains even number of nodes.

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].

PS: Doing without using extra memory would fetch more points

Sample Testcases:

Input #00:

{1,2,3,4,5,6,7,8,9,10,11,12}

Output #00:

{1,5,9,2,6,10,3,7,11,4,8,12}

Explanation:

Here as you can notice, the array is of the form
{a1,a2,a3,a4,b1,b2,b3,b4,c1,c2,c3,c4}

Maximizing valleys in an unsorted array: 1 geek 1 week

A Valley is cell (in an array) which has less value than its immediate neighbours. Given an unsorted array, the task is to rearrange the numbers in such a manner so as to maximize the number of valleys in that array.

Now redefine the Valley to extend the problem. A Valley is now a cell which has value less by a given threshold than its immediate neighbours.

The first part seems easy. Please suggest solutions for the extended problem.

write htoi() 8 Ravi Biradar 1 week

Given a string that contains hexadecimal number, write a function htoi() that returns the equivalent integer calue

Largest Binary Search Tree in a given Binary Tree 8 aayush kumar 2 weeks

Given a binary tree, find the largest binary SEARCH tree in this binary tree.

When I mean largest, the tree with maximum number of nodes. And the binary search tree should be a sub-tree in the given binary tree.

Note: Not every binary tree is a binary search tree

kth smallest element in the union of the arrays in a logarithmic time algorithm 9 daniel 2 weeks

Given two *sorted* arrays of n elements each, is it possible to find the kth smallest element in the union of the arrays in a logarithmic time algorithm?

Second minimum spanning tree 1 2 weeks

Is there a way to find the second minimum spanning tree in less than O(V^2)? If yes can you supply the theorem or algorithm

Spanning trees by rank 1 jayash 3 weeks

We all know how to find the minimum spanning tree of a connected weighted undirected graph. Can you give an algorithm to find the second , third... minimum spanning trees by weight?

data structures for text editor 3 Venki 3 weeks

may i get more elaborated description of what data structures should be used to make a text editor

maximum number of people in a party 1 alp 3 weeks

There is a list containing the checkin and checkout time of every person in a party . The checkin time is in ascending order while the checkout is random .
Eg:

                       Check_in                Check_out
Person 1             8.00                          9.00
Person 2             8.15                          8.30
Person 3             8.30                          9.20

and so on ...Now , give an optimized solution to find at what time the maximum number ...

Microsoft Interview Question 1 3 weeks

Remove extra or duplicate parenthesis.
example: ((a+b) *((c+d)))
will be outputted as (a+b)*(c+d)

Algorithms: 'n' balls 'm' boxes with capacity constraints. 1 alpha 3 weeks

Hi guys,

I am looking for algorithm to solve the following problem:
Given 'n' balls and 'm' boxes with capacities c[1]......c[m], find an algorithm to calculate no. of ways in which these 'n' balls can be distributed in given boxes satisfying their capacity constraints. Each box can contain 0 or more balls but less than or equal to its capacity.

Any algorithm to solve this problem?

Asymptotic notation question 1 learner 3 weeks

Asymptotic notations problem
If p(n) = O(f(n)) and q(n)=O(f(n))

then p(n) / q(n) = O(1) true or false, prove your answer

Largest monotonically increasing sequence in an array 6 gvk 3 weeks

Write code for finding length of largest monotonically increasing sequence in an array of integers. Optimize it (not the usual O(n) in worst case, but a better approach in average case).