Alalysis of Algorithms & Problem Solving

Alalysis of Algorithms & Problem Solving Contact information, map and directions, contact form, opening hours, services, ratings, photos, videos and announcements from Alalysis of Algorithms & Problem Solving, Computer Company, Bangalore.

08/11/2015

Q) Find zeroes to be flipped so that number of consecutive 1’s is maximized.

Input: arr[] = {1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 1}
m = 2
Output: 5 7

16/05/2015

Q) N sorted arrays are given. Combine them to get an overall sorted array. You can assume arrays to be of same size.

e.g: i/p : a1={3,7,9,10} a2={2,4,8,11} a3={1,6,8,15}
o/p: {1,2,3,4,6,7,8,8,9,10,11,15}

03/10/2014

Given a binary tree, change the value in each node to sum of all the values in the nodes on the left side of the node.

Eg
1
/ \
2 3

3
/ \
2 6

03/10/2014

Write a function to remove the duplicated characters from a string, and maintain the order of the characters.

ex. “abracadabra” ? “abrcd”

30/06/2014

Write a method that takes a given string and replaces all occurrences of one string with another string, returning the number of replaces made. For instance given the string “Microsoft” if you were to replace all occurrences of “ic” with “MSFT” the result would be “MMSFTrosoft” with a return value of 1.

30/06/2014

Implement a method called printNonComments() which prints out a extract of text with comments removed.

For example, the input:

hello /* this is a
multi line comment */ all

Should produce:

hello
all

30/06/2014

Swap 2 nodes in a Binary tree.(May or Maynot be a BST)
Swap the nodes NOT just their values.

ex:
5
/ \
3 7
/ \ /
2 4 6

swap 7 and 3

5
/ \
7 3
/ / \
6 2 4

14/06/2014

Q) Given a string of alphabets containing spaces(may be multiple), write a code to remove the spaces. (if u solve it properly then they will add more constraints and ask u to improve the algorithm).

14/06/2014

Q) Generate the binary combinations of a given Number.

14/06/2014

Q) write a program to evaluate an expression : 2+4*7-6

14/06/2014

Q) Dancing Of a String .

Need to print the characters in alternative upper and lower cases.
characters may involve special characters, but no need to consider.

Input :: Hello@:Wo;ldh
output:HeLlO@:wO;lDh

21/04/2014

Q). Given two Linked lists, find out whether they intersect or not and where do they intersect

Address

Bangalore

Website

Alerts

Be the first to know and let us send you an email when Alalysis of Algorithms & Problem Solving posts news and promotions. Your email address will not be used for any other purpose, and you can unsubscribe at any time.

Share