/NQT-20

NQT 2020 Programming Section Solutions

Primary LanguageJavaMIT LicenseMIT

NQT-20

This Repository contains the programming questions & solutions asked in TCS National Qualifier Test held in October 2020

  1. Jar of Candies - Display JAR at Counter with available number of candies(Asked on 24th October)
  2. Selection of MPCS exam based on oxygen level of trainees(Asked on 24th October)
  3. Washing Machine Problem - Given Input as Weight of laundry in grams determine the time required to wash the laundry.(Asked on 24th October)
  4. Caesar cipher Program - Given Input as a message create a custom caesar cipher function to convert the message into encrypted code.(Asked on 24th October)
  5. Painting a Property - Given Surface areas of Interior and Exterior walls determine the cost of paint required.(Asked on 25th October)
  6. City Bus Fare - Given n BusStops determine the fare required to travel from source to destination stop.(Asked on 25th October)
  7. Monkey Problem - Given Bananas and Peanuts as treat to N monkeys, determine how many monkeys are left on the tree which didnot get the treats(Asked on 25th October)
  8. Chain Marketing Problem - Given a Parent member and/or N child members determine the commission each member will get.(Asked on 25th October)
  9. Car Parking Problem - Write a program to park a car & search for a car parked.(Asked on 25th October)
  10. Train Problem - Given Train timings of Train A, determine timings of train B in similar fashion.(Asked on 25th October)
  11. Fully Automatic Vending Machine Program - Given different menus and sub menus, make an order for the customer(Asked on 26th October)
  12. Seating Arrangement in an Exam Hall Problem(Asked on 26th October)
  13. Doctor's Clinic - Based on given consulation fees grouped by ages, calculate the total earnings of the doctor for the day(Asked on 26th October)
  14. SetBalls - Classify the given set(SetBalls[]) based on the given input which can be one value among: Brand / Size / Weight / Color and display all new sets after classification with the criteria name at the beginning of the set in sorted order of Criteria. (Asked on 26th October)
  15. Bucket of Water - Given Bucket and mug capacity to hold water, determine how many mugs will be required to fill 80% of the bucket.(Asked on 26th October)
  16. Invalid Mobile Number - Given a set of Mobile Numbers, determine the number of invalid mobile numbers present.(Asked on 26th October)
  17. Fibonacci Series - For a given number N, print fibonacci series, Number of even numbers present in the series & number of odd numbers.(Asked on 27th October)
  18. Count Vowels - Given a string message as input, count the vowels present in the string and print them with a string without the vowels(Asked on 27th October)
  19. IPL Teams - Given N number of teams, Write a code to display Pairing of Teams and possible number of matches possible excluding Semi Final and Final.(Asked on 27th October)
  20. Sports Selection - For Annual sports, n no. of candidates participated, out of which only m number of candidates are selected based on thier heights. The m candidates with max heights are selected. (Asked on 27th october)
  21. Eye Checkup camp - Given N number of patients(1<=N<=10), form 2 queues where Queue2 will contain patients above age 60 & upto 5 members only, remaining will be assigned to Queue1. If 1 patient takes 15mins calculate how much time Queue1 and Queue2 will indivually take.(Asked on 27th October)
  22. Food Court - A food court has decided to make an app which will display menu card and place their order. Given Menu number and quantity, determine the total bill of the customer.(Asked on 28th October)
  23. Customer Discount - On total billing amount, if total bill is above 1000, 10% dicount is applied, if total bill is below 1000 no discount. If customer is member then additional 5% if total billing amount is above 1000 and 8% if below 1000 amount.(Asked on 28th October)
  24. TV purchasing - Given few conditions, determine the discounted price upon a set of TVs.(Asked on 28th october)
  25. Shop of Soft Toys - Given N toys displayed on the shelf of the store, customer randomly picks one toy by specifying it's name or item number. Display the remaining shelf items as output once the toy is removed from the shelf.(Asked on 28th October)
  26. Travel Agency - A Travel Agency is conducting a survey for 5 countries from 5 users for determining the highest ranked countries. Each user will rank each country from 1 to 5, 1 being the highest rank. The country/countries with maximum number of rank 1s is declared as highest rank country/countries. Print the countries with highest rank.(Asked on 28th October)
  27. Bunch of Keys - Given N keys, determine blank keys,duplicate keys,distinct keys and print the blank keys, total number of keys and total number of locks.(Asked on 28th October)
  28. Write a Program to find the number of characters and words in a given sentence(Asked on 29th october)

Note: Full detailed program statement of each problem is included in the source code file