gowtham.n.mail
BAN USER- 1of 1 vote
AnswersSMS Problem
- gowtham.n.mail in United States
1 - NULL, 2 - ABC, 3 - DEF, 4 - GHI, 5 - JKL, 6 - MON, 7 - PQRS, 8 - TUV, 9 - WXYZ, * - <Space>, # - <Break>
We must convert the numbers to text.
Eg
I/P - O/P
22 - B
23 - AD
223 - BD
22#2 - BA (# breaks the cycle)
3#33 - DE
2222 - 2
2222#2 - 2A
22222 - A (cycle must wrap around)
222222 - B| Report Duplicate | Flag | PURGE
Epic Systems Software Engineer / Developer
I mean to say that, the median of the diagnoal is the median of the whold matrix!
- gowtham.n.mail January 04, 2012Graph Problem
A directed graph can be constructed, where the wdge goes from person A to person B, if A likes B.
Then do topological sort with the adjacency matrix. The Number at the last in the sorted list is the Leader.
Will this work. I think it assumes that there exist 1 person who is liked by all, and does not like anyone
The median of the diagnoal will be the median of the whole array.
Because if we read the matrix in diagnoal form from top left (smallest element in matrix) to bottom right (largest element in matrix) we will get a sorted list of the entire matrix.
There are various similarity measures like cosine or co-relation which can be used ... even a modified apriori algo can be used ... but this can be answered only by ppl with knowledge in data mining ... I cant think of any way this can be solved other than IDA ie, iterative deepening search.
What abt IDA* ?
sorry 2#2
- gowtham.n.mail November 25, 2011for AA we should type A#A
and 2222 is 2 and not A, because the order is Ab B, C and then the number itself which is 2. Only after this the wrap around starts.
This could be a Dynamic Programing problem. Or it is a memorization problem?
- gowtham.n.mail January 04, 2012