yeah,
I got that much. But I do not think this is implementable O(N)...this would result in O(N^2)
Thanks a lot.
User Profile
Collapse
-
no....u do not need to count the numbers...i mean its not that u must not...but only thing required is to print them.... counting is not really a concern here....Leave a comment:
-
okay, i think i did not make it clear. But I do not need to calculate the numbers, rather print them. And here 1 2, is different than 2 1. Or may be we can skip permutation.Leave a comment:
-
for simplicity sake we can also assume that the input is given as an adjacency matrix.Leave a comment:
-
Hey Jos,
Thanks for replying,
But how do you code it with linear time complexity?Leave a comment:
-
Given there are N people, .....
Given there are N people, one of them is such as he is known by everybody but doesn't anybody.
How to identify him?
Also, how to identify whether such a person exist in the given set. -
Print all combinations of a number N, as a sum of positive integers?
For example:
3=
2 1
1 2
1 1 1
4=
3 1
1 3
1 1 2
1 2 1
2 1 1
1 1 1 1
and so on...
How to write a program in C for such a problem...I can't even seem to figure out the algo?
No activity results to display
Show More
Leave a comment: