Design a data structure which can be used efficiently for simulating car parking.It can have three different operations... 1 car_in 2 car_leave 3 Reset all
Write a code to find r-combination of a String of length n. Ex: for String "abcd" Combinations are: "" "a" "b" "ab" "c" "ac" "bc" "abc" "d" "ad" "bd" "abd" "cd" "acd" "bcd" "abcd"
Given a node from a cyclic linked list which has been sorted, write a function to insert a value into the list such that it remains a cyclic sorted list. The given node can be any single node in the list.
There are multiple api's for serializing and de-serializing strings while communicating from one process to another.Json is one of the most famous.Write your own api which will serialize a list of string and deserialize the list into individual string.
If there are n number of people invited in a party, who can shake hands with one another (where n > 1 ). After sometime host says that there is always a pair of people who has shake hands with the same number of people.How he came to know.
Solve the equation: p *e - x + q *sin( x ) + r *cos( x ) + s *tan( x ) + t * x 2 + u = 0 where 0 <= x <= 1 . p,q,r,s,t,u are variables.(where 0 <= p , r <= 20 and -20 <= q , s , t <= 0 ). For each set of input, there should be a line containing the value of x , correct upto 4 decimal places, or the string " No solution ", whichever is applicable. eg: Input 0 0 0 0 -2 1 1 0 0 0 -1 2 Output: 0.7071 No Solution