Posts

Showing posts with the label PROBLEM

Important TCS CodeVita Questions Solved – Sheldon Cooper and his beverage paradigm

Image
Important TCS CodeVita Questions Solved – 2015 Problem : Sheldon Cooper and his beverage paradigm Sheldon Cooper, Leonard Hofstadter and Penny decide to go for drinks at Cheese cake factory. Sheldon proposes to make a game out of this. Sheldon proposes as follows, To decide the amount of beverage they plan to consume, say X. Then order for a random number of different drinks, say {A, B, C, D, E, F} of quantities {a, b, c, d, e, f} respectively. If quantity of any three drinks add up to X then we’ll have it else we’ll return the order. E.g. If a + d + f = X then True else False You are given Number of bottles N corresponding to different beverages and hence their sizes Next N lines, contain a positive integer corresponding to the size of the beverage Last line consists of an integer value, denoted by X above Your task is to help find out if there can be any combination of three beverage sizes that can sum up to the quantity they intend to consume. If such a combination...

TCS Codevita Minimum Distance Solution

Image
Problem : Minimum Distance Two riders A and B are travelling on a highway towards each other on two roads that intersect at right angle at speeds  V A meters/second and  V B  meters/second. A is at a distance of  'x'  meters and B is at a distance of  'y'  meters from the intersection. Calculate the minimum distance between these two riders that is possible.                                                               Fig:Approaching Intersection Input Format: First line contains the distance of Rider A from intersection denoted by x Second line contains the distance of Rider B from intersection denoted by y Third line contains the Vel...

TCS Codevita N Queen Problem with Solution

Image
Problem : Given a n x n grid, how would you place n queens so that no two are attacking. Two queens are said to be attacking if they are on same row, column or diagonal. The naive solution of this problem will require to find  all the permutations i.e. finding all the n! arrangements. A typical example of n queen problem is 8 queen problem which requires us to find possible placements of 8 queens on a 8 x 8 chess board. One of the arrangements of 8 x 8 problem is shown below :  Placements of 8 queens over 8 x 8 chess board Solution of this problem can be thought as follows: We start from first row and proceed to next row till last row. if next queen to be placed has same column value as already placed queen has then don't place the queen. This can be checked by traversing from i=1 to i= k-1 where k is the next row where queen is to be placed. if next queen to be placed lies in any of the diagonals of already placed queens then don't place the queen. This can be do...

GET JIO SIM not showing Error [[Solved]] Jio 4G

Image
Hello all,               Now a days Jio is popular in India .  And  there is Finger Print scanning card issuing is  available  .But at the old stores there is one thing THAT'S BAR CODE GENERATED from APP.                There are terrible issue of generating Barcode from the app for many Mobile users.I am providing an hack so that you can generate code easily  To generate This Jio code Follow these steps - Step 1 . Install old J io  app Click Here Download Step  2 . install other 10 apps. Step 3 Turn off Internet and Open My Jio App and click on open at My Jio(Be really Quick). Now click on Get Jio Sim.   dNow Quickly Start Internet. If you get Update Warning Turn off internet and do 3rd Step again . I recomend to use slow internet connection .  Step 4 . If you pass the Third Step then Its so easy .You just need...