geeksavy
BAN USERdoubt clarifications
- 0of 0 votes
AnswersGiven a set of numbers from 1 to n^2, generate subsets consisting of n numbers such that each subset has one and only one matching number from any other subset
- geeksavy in India
The max number of sub-sets is n squared + n
An example is as follows:
n = 3
n squared set = 1, 2, 3, 4, 5, 6, 7, 8, 9
sub-set 1 = 1, 2, 3
sub-set 2 = 1, 4, 7
sub-set 3 = 1, 5, 9
sub-set 4 = 1, 6, 8
sub-set 5 = 2, 5, 8
sub-set 6 = 2, 4, 9
sub-set 7 = 2, 6, 7
sub-set 8 = 3, 6, 9
sub-set 9 = 3, 5, 7
sub-set 10 = 3. 4, 8
sub-set 11 = 4, 5, 6
sub-set 12 = 7, 8, 9| Report Duplicate | Flag | PURGE
Microsoft Algorithm - 0of 0 votes
AnswersWe are given a binary search tree; we need to find out its border.
So, if the binary tree is10 / \ 50 150 / \ / \ 25 75 200 20 / \ / / \ 15 35 120 155 250
It should print out 50 25 15 35 120 155 250 20 150 10.
If the binary tree is10 / \ 50 150 / \ / 25 75 200 / \ / \ 15 35 65 30
It should be like 50 25 15 35 65 30 200 150 10.
- geeksavy in United States
How can this be done? ?| Report Duplicate | Flag | PURGE
- 0of 0 votes
Answersgiven an array find the set of consecutive numbers which gives the maximum sum
- geeksavy in India
I/P 1 3 -5 15 1 11 -15 18
o/p : 15+1+11 gives the maximum sum
the code should return 15,1,11
can u tell me the logic??
Thanks in advance| Report Duplicate | Flag | PURGE
Arrays
RepSpent 2001-2006 licensing the elderly in Jacksonville, FL. Spent 2001-2004 consulting about Break Up Spell. Spent two years deploying crickets ...
Repqueznister, Android test engineer at Aspire Systems
I supervise the day-to-day operations of the store. assign duties. Determine staffing requirements, oversee their hiring, and, when needed, dismiss ...
Repliliylinda619, Area Sales Manager at Alliance Global Servies
My name is Sarah Torres and I am a Fitness director in the Independent Planners. I am a very kind ...
@salvo4u thanks! such a simple logic for array with +ve ints!
- geeksavy May 15, 2012