This is the simplest way i thought it could be done...
Its a simple ternary operator (you can consider as "if else" blocks)
I will explain it with an easy example :
Suppose if a=2, b=1 and c=3.
Now our expression is ((a>b)?a:b)>c)?((a>b)?a:b):c)):
Consider (a>b)?a:b expression :
(a>b) is true so (a>b)?a:b will mean "a"... right !!!
now by replacing that part(highlighted in red below) in the expression by "a", ((a>b)?a:b)>c)?((a>b)?a:b):c))
we will get:
which means "c", as (a>c) is false.
So, c is the largest number and will be printed as the output.
Isn't it simple ???? ;)
I am working creating a fully encapsulated, homogeneous singly linked data structure. The Listing class and SinglyLinkedList class that are part of the whole application compile fine, but the problem ...