• edited by
783 views

1 Answer

Best answer
5 5 votes

x % 3 can give only three values 0,1,2

when x%3=0 ------->(x+1)%3=1 ....so 0+1=1
when x%3=1 ------->(x+1)%3=2 ....so 1+2=3
when x%3=2 ------->(x+1)%3=0 ....so 2+0=2

so max value of x%3+(x+1)%3 = 3

• selected by
Position:
Show:

Related questions

5 5 votes
1 answers 1 answer
669
669 views
Aboveallplayer asked Nov 28, 2016
669 views
a fair dice is rolled until the output appers to be >4..now what is the probability that we need an even number of roll to get that?(forgot the options)
2 2 votes
1 1 answer
1.3k
1.3k views
Aboveallplayer asked Nov 27, 2016
1,321 views
What is the time complexity of finding the kth smallest element in an array?$O(\log n)$$o(\log n)$$\Omega(n\log n)$$O(n)$
0 0 votes
1 answers 1 answer
870
870 views
Aboveallplayer asked Nov 25, 2016
870 views
FD s given P1P3->P4, P1->P2, P2->P1nowa) bcnf and p2p3->p4 holdsb)bcnf and p2p3->p4 does not holdc)3nf not in bcnf and p2p3->p4 holdsd)3nf not in bcnf and p2p3->p4 does...