Click here for the questions
1)Place a red ball in a urn and all the further balls in the other urn.The probability for picking out the red ball is now greater than 0.5.
2)If v<=2V then the position is (v*L)/(2*V) from the starting point else it is 2*L -(v*L)/(2*V) from the starting point.
4)If we know the process then we can kill it by killall -9 "process name" else we can kill it using its process id obtained by the command ps -x by kill -9 "processid" .
5)Top command displays all the Linux tasks running at that particular time.It provides their running time and the resources used.
6)The number appearing 2 times is (sum of all the numbers in the array) - (sum of the numbers from 1 to n).
For floating numbers multiply it with 100 and proceed.
Complete solution for 2nd problem::
ReplyDeletetime when 2 trains meet = time the particle has to travel = L/(2*V)
So, distance traveled by particle, S = v*(L/(2*V))
let x= S/L and y = S % L
if x is odd then position from A = L-y
else y