Edit
Reply




Edit

  1. Home
  • Add an Event
  • Add an Interview Experience
  • Add a Discussion
Add
Logical Reasoning

Discussions on Data Interpretation and Logical Reasoning

Given an array containing only 0s and 1s, find the largest subarray which contain equal no of 0s and 1s. Examples: Input: arr[] = {1, 0, 1, 1, 1, 0, 0} Output: 1 to 6 (Starting and Ending indexes of output subarray) Input: arr[] = {1, 1, 1, 1} Output: No such array Input: arr[] = {0, 0, 1, 1, 0} Output: 0 to 3 Or 1 to 4 Input Format Input contains the no of elements & array values Constraints 1 d array_size d 10000 Output Format Print the index i1->in if exist else print No such array . If more than 1 found print all Sample Input 0 7 1 0 1 1 1 0 0 Sample Output 0 1->6

David sets his watch at 6:10 am on Sunday, which gains 12 minutes a day. On Wednesday if this watch is showing 2:50 pm. What is the correct time?

1 Comment
Prakhar 3 months ago
2 bajke 10 minute, asan tha yar ye toh

hi in tcs I am came across these type of coding.can anyone help me to find the logic for below pattern 1.inpur 12*10=1water0 output =2 2.input 123+546=6water9 output =6

3 Thanks
Mona Singh 3 months ago
11
Vikash_J 3 months ago
Are u mad??
saipradeep 4 months ago
send me link bro

Hello Guys! We received a lot of queries asking if Command line arguments are a part of TCS exam syllabus. Although TCS has not officially announced anything regarding this, there is a chance that they might ask questions related to command line arguments in the programming MCQs section. So please refer this article and be prepared for it - http://bit.ly/2Zx7FJ1 Note: This is for the 2018, 2019 batches attending the TCS Offcampus drive on 1st September

20 Thanks 9 Comments
Mohit Gupta 4 months ago
Answer was 60
Open in App