The Saga of the Missing Coin A teacher came into the class with a large box that has several coins. Each coin has a number printed on it. Before coming to the class, she ensured that all the numbers occur an even number of times. However, while coming to the class once coin fell down and got lost. She wants to find out the number of the missing coin. Samp…
Read moreSober Walk Our hoary culture had several great persons since time immemorial and king vikramaditya’s nava ratnas (nine gems) belongs to this ilk.They are named in the following shloka: Among these, Varahamihira was an astrologer of eminence and his book Brihat Jataak is recokened as the ultimate authority in astrology. He was once talking with Amarasimha,another g…
Read moreOddly Even TCS NQT Given a maximum of 100 digit numbers as input, find the difference between the sum of odd and even position digits. Input : 4567 Expected output: 2 Explanation Here, the sum of odd position digits 4 and 6 is 10. The Sum of even position digits 5 and 7 is 12. The difference is 12-10 = 2. Logic Take input as string hence you can check t…
Read moreCopyright © 2021 Coding Demons All Rights Reseved
Social Plugin