Posts

TCS DIGITAL| Advanced Coding

  Advanced Coding   Question 1 (Even-Odd series):  Given a string and it contains the digits as well as non-digits. We have to find the count of non-digits. If it is odd then remove all the non-digits and print the string as in even-odd order.If it is even then print the string as in odd-even order. E.g.  The given string is  */24#5%7&9*3@ . We have to count the non-digit. It’s 7, odd. Then remove all the digits from the string and output will become (in a string) 254739. In the problem, we have only 2 even and 4 odd numbers then after the even number of completion print the remaining odd numbers. Solution:  This is a basic question and the time complexity is O(n) ·          Python string = input ()  characters = [] even = [] odd = [] for i in string:      if i.isdigit():          if int (i) % 2 == 0 :              even.append(i)          else :              odd.append(i)      else :          characters.append

TCS DIGITAL| English Language

  English Language 1. There has been a divergence ____________ the bank’s disclosed nonperforming assets (NPAs) for fiscal year 2015-16 and the Reserve Bank of India’s (RBI) assessment, ____________ to underprovisioning.   (A) Over, optimum   (B) During, unremarkable   (C) Among, unrivalled   (D) Between, leading   (E) Of, incomparable     2. As a _____________ regulator, the Securities and Exchange Board of India (SEBI) has taken strong corrective steps and what we have are well-regulated, completely dematerialized and smooth functioning capital markets, which _____________ confidence.   (A) Fanatical, dissuade (B) Passive, impel (C) Proactive, inspire (D) Vigorous, instigate (E) Effective, enervate     3. As any business strategy professor will tell you, when customers ___________ the products to be similar, price (in this case discounts) ___________ the key differentiator.   (A) Descry, set s (B) Acknowledge, receives (C) Appreciate gives   (D

TCS Digital|Quantitative Aptitude

  Quantitative Aptitude 1. A company offered its 350 employees a bonus of Rs 10 to each male and Rs 8.15 to each female. All the females accepted but a certain percentage of males refused to accept. The total bonus paid was independent of the number of males. What was the total amount paid to the females (in rupees)? 1. 1672.50 2. 1222.50 3. 2852.50 4. None of these Answer :  Option 2     2. Ram bought ‘a’ flowers for ‘b’ rupees, where ‘a’ and ‘b’ are integers. If he had bought 10 more flowers he would have got all for Rs. 2 and saved 80 paisa a dozen. What are the respective vales of ‘a’ and ‘b’? 1. 5,1 2. 4,2 3. 3,2 4. 6,1 Answer :  Option 1   3. The integers 49966 and 52231 when divided by a three digit number ‘n’ give the same remainder. What is the value of n? 1. 367 2. 453 3. 462 4. 298 Answer :  Option 2   4. The HCF of two numbers is 21 and their LCM is 4641. If one of the numbers is between 200 and 300, find the other number. 1. 22