ConsultAdd Inc interview experience Real time questions & tips from candidates to crack your interview

Software Engineer

ConsultAdd Inc
upvote
share-icon
1 rounds | 1 Coding problems

Interview preparation journey

expand-icon
Journey
My preparation was strong in coding and problem-solving, but I realized I had very little idea about core CS fundamentals. Since these topics are often asked in interviews, I’ve started focusing on revising the basics like Operating Systems, DBMS, Computer Networks, and OOPs concepts alongside my regular practice.
Preparation
Topics: Operating Systems, DBMS, DSA, OOPs
Application process
Where: Coding Ninjas Placement Cell
Eligibility: B.Tech CS/IT (Grad Year-2025 & 2024)

Interview rounds

01
Round
Easy
Online Coding Interview
Duration
Interview date12 Mar 2025
Coding problem1

1. Transform String with L and R Moves

You are given two strings, start and target, both of length n.
Each string consists only of the characters 'L', 'R', and '_', where:

  • 'L' → A piece that can move left only, but only if there is a blank space ('_') directly to its left.
  • 'R' → A piece that can move right only, but only if there is a blank space ('_') directly to its right.
  • '_' → A blank space that can be occupied by 'L' or 'R'.

Task:
Return true if it is possible to obtain the string target by moving the pieces of the string start any number of times. Otherwise, return false.

Constraints:

  • 1 <= n <= 10^5
  • Both strings contain only 'L', 'R', and '_'.
Problem approach
  1. Check Character Order
    1. Remove all _ characters from both start and target strings.
    2. Compare the remaining sequences of 'L' and 'R'.
    3. If they are not identical, return false, since the relative order of pieces must remain the same (pieces cannot cross each other).
  2. Validate Movement Rules
    1. Traverse both start and target while keeping track of the positions of 'L' and 'R'.
    2. For each 'L' in start, its index must be greater than or equal to its corresponding index in target (because 'L' can only move left).
    3. For each 'R' in start, its index must be less than or equal to its corresponding index in target (because 'R' can only move right).
    4. If any condition is violated, return false.

If both checks pass, return true.

Here's your problem of the day

Solving this problem will increase your chance to get selected in this company

Skill covered: Programming

What is recursion?

Choose another skill to practice
Similar interview experiences
Software Engineer
1 rounds | 2 problems
Interviewed by ConsultAdd Inc
52 views
0 comments
0 upvotes
Software Engineer
1 rounds | 1 problems
Interviewed by ConsultAdd Inc
52 views
0 comments
0 upvotes
Software Engineer
1 rounds | 2 problems
Interviewed by ConsultAdd Inc
48 views
0 comments
0 upvotes
Software Engineer
1 rounds | 1 problems
Interviewed by ConsultAdd Inc
46 views
0 comments
0 upvotes
Companies with similar interview experiences
company logo
Software Engineer
4 rounds | 1 problems
Interviewed by Newgen Software
3210 views
2 comments
0 upvotes
company logo
Software Engineer
3 rounds | 6 problems
Interviewed by HashedIn
2582 views
0 comments
0 upvotes
company logo
Software Engineer
2 rounds | 2 problems
Interviewed by Ernst & Young (EY)
0 views
0 comments
0 upvotes