ASimpleCoder
BAN USER- 0of 0 votes
Answersgiven two array of elements representing the connection Nodes output the topology used?
- ASimpleCoder in India
Topology can be either Bus , circular or Star
input:
Number of nodes 3
Number of Connections : 2
{1,2}
{2,3}
Output Bus
Explanation
the topology formed would be 1->2->3 . hence Bus
input
number of nodes : 3
Number of connections : 3
{1,2,3}
{2,3,1}
Output: Circular
the topology formed is 1->2->3->1
hence circular
input:
number of nodes : 5
Number of connections : 5
2 3 4 5
1 1 1 1
Answer : StarTopology
Explanation : A star can be formed with this input
2 4
1
3 5
StarTopology| Report Duplicate | Flag | PURGE
Starup SDE-2 - 0of 0 votes
AnswersGiven a set of start date and end date design a data structure to return a given date falls in.
- ASimpleCoder in India
Example
1Sep 2016 - 10 Sep 2016
1 Jan 2009 - 31 Aug 2015
given 12 Jan 2014 should return 1 Jan 2009 - 31 Aug 2015| Report Duplicate | Flag | PURGE
Yatra.com SDE-2 - 1of 1 vote
AnswersFind the largest sequence in a array which sums to zero
- ASimpleCoder in India| Report Duplicate | Flag | PURGE
Amazon - 0of 0 votes
AnswersProvided a number dictionary and a number, x , which is formed from the number dictionary. Find the rank of the number x? Rank is defined as the position of the number x when all the number formed from the dictionary are sorted.
- ASimpleCoder in India
Example
Input :{4,1,5}
X : 451
Output : 4
(145,154,415,451,514,541). 451 comes at 4th position| Report Duplicate | Flag | PURGE
Amazon SDE1
Yes
- ASimpleCoder May 12, 2014