is a comprehensive book on getting a job at a top tech company, while focuses on dev interviews and does this for PMs.
CareerCup's interview videos give you a real-life look at technical interviews. In these unscripted videos, watch how other candidates handle tough questions and how the interviewer thinks about their performance.
Most engineers make critical mistakes on their resumes -- we can fix your resume with our custom resume review service. And, we use fellow engineers as our resume reviewers, so you can be sure that we "get" what you're saying.
Our Mock Interviews will be conducted "in character" just like a real interview, and can focus on whatever topics you want. All our interviewers have worked for Microsoft, Google or Amazon, you know you'll get a true-to-life experience.
Algo:
- gauravkadyan May 03, 2014Step 1: choose one node as "acceptor" node.
Step 2: all of the other nodes send their values to acceptor node. Acceptor node 'adds' them to its value. So this has 'n - 1' operations. And now the value of acceptor node is 10.
Step 3: acceptor node sends its value to all the other nodes and the other nodes 'overwrite' the value, so all the other nodes too get the value 10. This also has 'n-1' operations.
Total number of operations '2n - 2'.
I hadn't logged in when I posted the result :(. Check the time difference between this post and original post its very close , which kindof proves that I made the earlier post as well.