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

Software Engineer

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

Interview preparation journey

expand-icon
Journey
I started my coding journey with Coding Ninjas’ Java DSA course, where I built a strong foundation in problem-solving. I have solved 400+ coding problems across platforms like Code360 and LeetCode, which helped me gain hands-on experience with data structures and algorithms. Alongside, I utilized college resources and Code360 guided paths to strengthen my understanding of core subjects like SQL, Operating Systems, and OOPS. This structured preparation has helped me build problem-solving skills and core CS fundamentals required for a software engineering role.
Preparation
Topics: SQL,OS and OOPS
Application process
Where: Coding Ninjas Placement Cell
Eligibility: B.Tech CS/IT (Grad Year-2025 & 2024)

Interview rounds

01
Round
Medium
Online Coding Interview
Duration
Interview date7 Mar 2025
Coding problem2

1. Longest Wiggle Subsequence

A wiggle sequence is a sequence where the differences between successive numbers strictly alternate between positive and negative. The first difference (if one exists) may be either positive or negative. A sequence with one element, or two non-equal elements, is trivially a wiggle sequence.

For example:

  • [1, 7, 4, 9, 2, 5] is a wiggle sequence because the differences (6, -3, 5, -7, 3) alternate between positive and negative.
  • [1, 4, 7, 2, 5] is not a wiggle sequence because its first two differences are positive.
  • [1, 7, 4, 5, 5] is not a wiggle sequence because the last difference is zero.

A subsequence is obtained by deleting some elements (possibly zero) from the original sequence, keeping the remaining elements in their original order.

Given an integer array nums, return the length of the longest wiggle subsequence of nums.

Problem approach

1. The approach for this question is to find difference between every consecutive elements of array i.e(nums[i+1]-nums[i] in the code) to check the difference is positive or negative , by doing this also check the pattern of positive-negative or negative-positive , do this by storing every current difference of elements and compare it with previous difference and check the pattern of pos-neg or neg-pos. 

2. Count this for how much elements of the given array this pattern is following and simply return the count

2. Count Total Car Collisions

There are n cars on an infinitely long road, numbered from 0 to n - 1 from left to right, with each car at a unique position. You are given a 0-indexed string directions of length n, where:

  • directions[i] = 'L' → the ith car moves left
  • directions[i] = 'R' → the ith car moves right
  • directions[i] = 'S' → the ith car stays stationary

All moving cars travel at the same speed. Collisions are calculated as follows:

  1. When two cars moving in opposite directions collide, the collision count increases by 2.
  2. When a moving car collides with a stationary car, the collision count increases by 1.
  3. After a collision, the cars involved stop at the collision point and cannot move further. Cars cannot change their direction otherwise.

Return the total number of collisions that will occur on the road.

Problem approach

1. We need to keep track of previous car direction and if it will collide with current car direction. 

2. A special case arises with cars going in left direction, which we track using a separate counter.

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
53 views
0 comments
0 upvotes
Software Engineer
1 rounds | 1 problems
Interviewed by ConsultAdd Inc
53 views
0 comments
0 upvotes
Software Engineer
1 rounds | 1 problems
Interviewed by ConsultAdd Inc
46 views
0 comments
0 upvotes
Software Engineer
1 rounds | 2 problems
Interviewed by ConsultAdd Inc
52 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