Open In App

TCS Interview Experience for SDE-1

Last Updated : 11 Aug, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Round 1: Online Coding Interview

Duration: 180 minutes
Interview Date: 22 Jul 2023

Problems:

Problem: Minimum Characters For Palindrome
Description: Given a string, return the count of minimum characters needed to be added at the front to make the string a palindrome.
Input: Integer ‘T’ (number of test cases), followed by ‘T’ test cases with strings.
Output: For each test case, print the count of minimum characters needed.
Constraints: 1 <= T <= 10, 1 <= N <= 10^5, String contains only lowercase English letters.

  1. Problem: Remove Duplicates from Sorted Array
    Description: Remove duplicates from a sorted integer array in place and return the length of the modified array.
    Input: Integer ‘N’ (number of elements), followed by ‘N’ space-separated integers.
    Output: Return the length of the modified array.
    Note: Modify the array in place with O(1) extra memory.

Round 2: Face to Face

Duration: 40 minutes
Interview Date: 26 July 2023
Problems:

  1. Problem: Add Binary Strings
    Description: Given two binary strings, find their sum in binary form.
    Input: Integer ‘T’ (number of test cases), followed by ‘T’ test cases with ‘N’ and ‘M’ (length of strings) and the binary strings ‘A’ and ‘B’.
    Output: For each test case, print the sum of the binary strings.
    Constraints: 1 <= T <= 5, 1 <= N, M <= 5000, ‘A’ and ‘B’ consist only of ‘0’ or ‘1’ characters.
  2. Problem: Puzzle – Gatekeepers to Heaven and Hell
    Description: Two gates, two gatekeepers – one tells the truth, the other lies. You can ask only one question to find the gate to heaven.
    Task: Write the question you would ask to determine the gate to heaven.

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments