Add office photos
Engaged Employer

HashedIn by Deloitte

4.2
based on 407 Reviews
Video summary
Proud winner of ABECA 2024 - AmbitionBox Employee Choice Awards
Filter interviews by

50+ Syrma SGS Technologies Interview Questions and Answers

Updated 25 Jul 2024
Popular Designations

Q1. Chocolate Pickup Problem

Ninja has a 'GRID' of size 'R' x 'C'. Each cell of the grid contains some chocolates. Ninja has two friends, Alice and Bob, and he wants to collect as many chocolates as possible with t...read more

Add your answer

Q2. Reverse the Linked List

Given a singly linked list of integers, your task is to return the head of the reversed linked list.

Input:

The first line of input contains an integer 'T' representing the number of tes...read more
Add your answer

Q3. Maximum Subarray Sum Problem Statement

Given an array arr of length N consisting of integers, find the sum of the subarray (including empty subarray) with the maximum sum among all subarrays.

Explanation:

A sub...read more

Add your answer

Q4. Find K'th Character of Decrypted String

You are given an encrypted string where repeated substrings are represented by the substring followed by its count. Your task is to find the K'th character of the decrypt...read more

Add your answer
Discover Syrma SGS Technologies interview dos and don'ts from real experiences

Q5. Leaders in an Array Problem Statement

Given a sequence of numbers, the task is to identify all the leaders within this sequence. An element is considered a leader if it is strictly greater than all the elements...read more

Add your answer

Q6. Detect and Remove Loop in Linked List

For a given singly linked list, identify if a loop exists and remove it, adjusting the linked list in place. Return the modified linked list.

Expected Complexity:

Aim for a...read more

Add your answer
Are these interview questions helpful?

Q7. Lowest Common Ancestor in a BST Problem Statement

You're provided with a Binary Search Tree (BST) containing 'N' nodes with integer values and two specific nodes, 'P' and 'Q'.

Your task is to identify the lowes...read more

Add your answer

Q8. Trailing Zeros in Factorial Problem

Find the number of trailing zeroes in the factorial of a given number N.

Input:

The first line contains an integer T representing the number of test cases.
Each of the followi...read more
Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Find Two Missing Numbers Problem Statement

Given an array of unique integers where each element is in the range [1, N], and the size of the array is (N - 2), there are two numbers missing from this array. Your ...read more

Add your answer

Q10. Longest Increasing Subsequence Problem Statement

Given an array of integers with 'N' elements, determine the length of the longest subsequence where each element is greater than the previous element. This subse...read more

Add your answer

Q11. Merge K Sorted Arrays Problem Statement

Given 'K' different arrays that are individually sorted in ascending order, merge all these arrays into a single array that is also sorted in ascending order.

Input

The f...read more
Add your answer

Q12. Convert Binary Tree to Mirror Tree Problem Statement

Given a binary tree, convert this binary tree into its mirror tree. A binary tree is a tree in which each parent node has at most two children. The mirror of...read more

Add your answer

Q13. Min Jumps Problem Statement

In Ninja town, represented as an N * M grid, people travel by jumping over buildings in the grid's cells. Santa is starting at cell (0, 0) and must deliver gifts to cell (N-1, M-1) o...read more

Add your answer

Q14. Convert a Number to Words

Given an integer number num, your task is to convert 'num' into its corresponding word representation.

Input:

The first line of input contains an integer ‘T’ denoting the number of tes...read more
Add your answer

Q15. Sort 0 1 2 Problem Statement

Given an integer array arr of size 'N' containing only 0s, 1s, and 2s, write an algorithm to sort the array.

Input:

The first line contains an integer 'T' representing the number of...read more
Add your answer

Q16. Minimum Number of Platforms Needed Problem Statement

You are given the arrival and departure times of N trains at a railway station for a particular day. Your task is to determine the minimum number of platform...read more

Add your answer

Q17. Anagram Pairs Verification Problem

Your task is to determine if two given strings are anagrams of each other. Two strings are considered anagrams if you can rearrange the letters of one string to form the other...read more

Add your answer

Q18. Longest Mountain Subarray Problem Statement

Given an array of integers denoting the heights of the mountains, find the length of the longest subarray that forms a mountain shape.

A mountain subarray is defined ...read more

Add your answer

Q19. Triplets with Given Sum Problem

Given an array or list ARR consisting of N integers, your task is to identify all distinct triplets within the array that sum up to a specified number K.

Explanation:

A triplet i...read more

Add your answer

Q20. Cycle Detection in a Singly Linked List

Determine if a given singly linked list of integers forms a cycle or not.

A cycle in a linked list occurs when a node's next points back to a previous node in the list. T...read more

Add your answer

Q21. Find All Pairs Adding Up to Target

Given an array of integers ARR of length N and an integer Target, your task is to return all pairs of elements such that they add up to the Target.

Input:

The first line conta...read more
Add your answer

Q22. Container With Most Water Problem Statement

Given a sequence of ‘N’ non-negative integers, A[1], A[2], ..., A[i], ..., A[N], where each number represents the height of a vertical line drawn at position 'i'. On ...read more

Add your answer

Q23. Group Anagrams Problem Statement

Given an array or list of strings called inputStr, your task is to return the strings grouped as anagrams. Each group should contain strings that are anagrams of one another.

An...read more

Add your answer

Q24. String Palindrome Verification

Given a string, your task is to determine if it is a palindrome considering only alphanumeric characters.

Input:

The input is a single string without any leading or trailing space...read more
Add your answer

Q25. Four Sum Problem Statement

You are provided with an array/list 'ARR' consisting of 'N' integers and an integer 'TARGET'. The task is to determine if there exist four distinct numbers in 'ARR' such that their su...read more

Add your answer

Q26. Lowest Common Ancestor (LCA) Problem Statement

Understanding the concept of Lowest Common Ancestor (LCA) in graph theory and computer science is essential.

Consider a rooted tree ‘T’ containing ‘N’ nodes. The L...read more

Add your answer

Q27. Remove Duplicates from String Problem Statement

You are provided a string STR of length N, consisting solely of lowercase English letters.

Your task is to remove all duplicate occurrences of characters in the s...read more

Add your answer

Q28. Last Stone Weight Problem Statement

We have a set collection of N stones, and each stone has a given positive integer weight. On each turn, select the two stones with the maximum weight and smash them together....read more

Add your answer
Q29. How would you design a social media platform with features such as friend requests and posts?
Add your answer

Q30. Write code to find max length subarray matching the given sum

Ans.

Code to find max length subarray matching the given sum

  • Use a sliding window approach to iterate through the array

  • Keep track of the current sum and the maximum length subarray

  • If the current sum exceeds the given sum, move the window's left pointer

  • If the current sum matches the given sum, update the maximum length subarray

  • Return the maximum length subarray

Add your answer
Q31. Design a music player similar to Spotify.
Add your answer
Q32. Can you describe a situation where you were given a schema and asked to write SQL queries based on it?
Add your answer

Q33. Write an SQL query to given an output from given tables

Ans.

SQL query to retrieve output from given tables

  • Identify the tables and their relationships

  • Determine the columns to be selected

  • Use appropriate join and filter conditions

  • Group and aggregate data if required

Add your answer

Q34. Designing of APIs, SQL query to find second largest value

Ans.

Designing APIs and finding second largest value in SQL query.

  • For API design, consider RESTful principles and use clear and concise naming conventions.

  • For finding second largest value in SQL, use ORDER BY and LIMIT clauses.

  • Consider edge cases such as duplicates and null values.

  • Test thoroughly to ensure correct functionality.

Add your answer
Q35. Can you describe the design of a banking system?
Add your answer

Q36. Write CLI snake and ladders game code

Ans.

CLI snake and ladders game code

  • Create a board with 100 cells using a 10x10 array

  • Define snakes and ladders positions as an array of tuples

  • Use a loop to alternate player turns and move them based on dice roll

  • Check for snakes and ladders and update player position accordingly

  • Print the board after each turn and declare winner when a player reaches cell 100

Add your answer

Q37. Sort an array of 0s,1s,2s in O(n) time.

Ans.

Sort an array of 0s, 1s, 2s in linear time.

  • Use three pointers to keep track of the positions of 0s, 1s, and 2s.

  • Traverse the array once and swap elements based on their values.

  • The final array will have 0s, 1s, and 2s grouped together in that order.

Add your answer

Q38. Find if pair sum exists in array

Ans.

Check if there exists a pair of numbers in the array that add up to a given sum.

  • Iterate through the array and for each element, check if the difference between the sum and the element exists in the array using a hash table.

  • Alternatively, sort the array and use two pointers to traverse from both ends towards the middle, adjusting the pointers based on the sum of the current pair.

Add your answer

Q39. Why do you want to join hashedin.

Ans.

I want to join Hashedin because of its reputation for innovative projects and collaborative work environment.

  • Reputation for innovative projects

  • Collaborative work environment

  • Opportunities for growth and learning

Add your answer

Q40. Method overloading vs Method overriding

Ans.

Method overloading is having multiple methods with the same name but different parameters. Method overriding is having a subclass method with the same name and parameters as a superclass method.

  • Method overloading is used to provide different ways of calling the same method with different parameters.

  • Method overriding is used to provide a specific implementation of a method in a subclass that is already defined in a superclass.

  • Method overloading is resolved at compile-time base...read more

Add your answer

Q41. Kth smallest element in array

Ans.

Finding the Kth smallest element in an array.

  • Sort the array and return the Kth element.

  • Use a min heap to find the Kth smallest element.

  • Use quickselect algorithm to find the Kth smallest element.

  • Divide and conquer approach using binary search.

  • Use selection algorithm to find the Kth smallest element.

Add your answer

Q42. rotate a array k times

Ans.

Rotate an array of strings k times

  • Create a temporary array to store elements that will be rotated

  • Use modulo operator to handle cases where k is greater than array length

  • Update the original array with elements from the temporary array

Add your answer

Q43. what is abstraction and encapsulation

Ans.

Abstraction is the concept of hiding complex implementation details and showing only the necessary information. Encapsulation is bundling data and methods that operate on the data into a single unit.

  • Abstraction focuses on what an object does rather than how it does it

  • Encapsulation restricts access to some of an object's components, protecting the object's integrity

  • Abstraction allows for creating simple interfaces for complex systems

  • Encapsulation helps in achieving data hiding...read more

Add your answer

Q44. 2 sum using linked list

Ans.

Use a hash table to find two numbers in a linked list that add up to a target sum.

  • Traverse the linked list and store each node's value in a hash table along with its index.

  • For each node, check if the difference between the target sum and the current node's value exists in the hash table.

  • If it does, return the indices of the two nodes.

  • Example: Given linked list 2 -> 4 -> 3 -> 5 and target sum 7, return indices 1 and 2.

Add your answer

Q45. Design a database for instagram

Ans.

Database design for Instagram platform

  • Create tables for users, posts, comments, likes, followers, and hashtags

  • Use primary and foreign keys to establish relationships between tables

  • Include fields such as user_id, post_id, comment_id, like_id, follower_id, and hashtag_id

  • Implement indexes for faster data retrieval

  • Consider scalability and performance optimization techniques

Add your answer

Q46. what is multiple inheritance

Ans.

Multiple inheritance is a feature in object-oriented programming where a class can inherit attributes and methods from more than one parent class.

  • Allows a class to inherit attributes and methods from multiple parent classes

  • Can lead to the Diamond Problem where ambiguity arises if two parent classes have a method with the same name

  • Languages like C++ support multiple inheritance

Add your answer

Q47. Code transpose of matrix

Ans.

Transpose a matrix by swapping rows with columns

  • Iterate through each row and column and swap the elements

  • Create a new matrix with swapped rows and columns

  • Ensure the new matrix has the correct dimensions

Add your answer

Q48. Implement swap method.

Ans.

Implement a swap method for two variables.

  • Create a temporary variable to store the value of one variable.

  • Assign the value of the second variable to the first variable.

  • Assign the value of the temporary variable to the second variable.

Add your answer

Q49. Depth of a binary tree

Ans.

The depth of a binary tree is the number of edges on the longest path from the root node to a leaf node.

  • Depth of a binary tree can be calculated recursively by finding the maximum depth of the left and right subtrees and adding 1.

  • The depth of a binary tree with only one node (the root) is 0.

  • Example: For a binary tree with root node A, left child B, and right child C, the depth would be 1.

Add your answer

Q50. Middle of linked list.

Ans.

To find the middle element of a linked list, use two pointers - one moving at double the speed of the other.

  • Use two pointers - slow and fast, with fast moving at double the speed of slow.

  • When fast reaches the end of the list, slow will be at the middle element.

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos

Interview Process at Syrma SGS Technologies

based on 8 interviews
4 Interview rounds
Coding Test Round
Video Call Round - 1
Video Call Round - 2
HR Round
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Interview Questions from Similar Companies

4.0
 • 81 Interview Questions
3.8
 • 35 Interview Questions
4.3
 • 31 Interview Questions
4.4
 • 25 Interview Questions
4.3
 • 15 Interview Questions
3.9
 • 10 Interview Questions
View all
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
70 Lakh+

Reviews

5 Lakh+

Interviews

4 Crore+

Salaries

1 Cr+

Users/Month

Contribute to help millions

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter