Add office photos
Employer?
Claim Account for FREE

Josh Technology Group

3.0
based on 74 Reviews
Filter interviews by

30+ Consilium Safety Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Longest Alternating Subsequence Problem

Given an array ARR of integers, determine the length of the longest alternating subsequence.

Input:

ARR = {Array elements}

Output:

Length of the longest alternating subse...read more
Add your answer

Q2. Buy and Sell Stock Problem Statement

Imagine you are Harshad Mehta's friend, and you have been given the stock prices of a particular company for the next 'N' days. You can perform up to two buy-and-sell transa...read more

Add your answer

Q3. Multiply Linked Lists Problem Statement

Your task is to multiply two numbers represented as linked lists and return the resultant multiplied linked list.

Explanation:

The multiplied list should be a linked list...read more

Add your answer

Q4. Add Two Numbers Represented by Linked Lists

Your task is to find the sum list of two numbers represented by linked lists and return the head of the sum list.

Explanation:

The sum list should be a linked list re...read more

Add your answer
Discover Consilium Safety interview dos and don'ts from real experiences

Q5. Closest Leaf in a Binary Tree

Ninja is stuck in a maze represented as a binary tree, and he is at a specific node ‘X’. Help Ninja find the shortest path to the nearest leaf node, which is considered an exit poi...read more

Add your answer

Q6. Minimum Jumps Problem Statement

Bob and his wife are in the famous 'Arcade' mall in the city of Berland. This mall has a unique way of moving between shops using trampolines. Each shop is laid out in a straight...read more

Add your answer
Are these interview questions helpful?

Q7. Spiral Matrix Problem Statement

Given a two-dimensional matrix of integers, print the matrix in a spiral order.

Input:

The first line contains an integer 't' indicating the number of test cases. For each test c...read more
Add your answer

Q8. Flatten Binary Tree to Linked List

Transform a binary tree with integer values into a linked list by ensuring the linked list's nodes follow the pre-order traversal order of the binary tree.

Explanation:

Utiliz...read more

Add your answer
Share interview questions and help millions of jobseekers 🌟

Q9. Maximum Non-Adjacent Subsequence Sum

Given an array of integers, determine the maximum sum of a subsequence without choosing adjacent elements in the original array.

Input:

The first line consists of an integer...read more
Add your answer

Q10. Divide Chocolates Problem Statement

Ninja bought chocolate consisting of several chunks, and the sweetness of each chunk is represented in an array ARR. He wants to divide the chocolate into K + 1 parts (cuts),...read more

Add your answer

Q11. Covid Vaccination Distribution Problem

As the Government ramps up vaccination drives to combat the second wave of Covid-19, you are tasked with helping plan an effective vaccination schedule. Your goal is to ma...read more

Add your answer

Q12. Sum Root to Leaf Numbers

You are given an arbitrary binary tree consisting of N nodes, each associated with an integer value from 1 to 9. Each root-to-leaf path can be considered a number formed by concatenatin...read more

Add your answer

Q13. Binary Tree Diameter Problem Statement

Given a binary tree, determine the length of its diameter. The diameter is defined as the longest path between any two end nodes in the tree. The path's length is represen...read more

Add your answer

Q14. Is Height Balanced Binary Tree Problem Statement

Determine if the given binary tree is height-balanced. A tree is considered height-balanced when:

  1. The left subtree is balanced.
  2. The right subtree is balanced.
  3. T...read more
Add your answer

Q15. N Queens Problem

Given an integer N, find all possible placements of N queens on an N x N chessboard such that no two queens threaten each other.

Explanation:

A queen can attack another queen if they are in the...read more

Add your answer

Q16. Rearrange Linked List Problem Statement

Given a singly linked list in the form 'L1' -> 'L2' -> 'L3' -> ... 'Ln', your task is to rearrange the nodes to the form 'L1' -> 'Ln' -> 'L2' -> 'Ln-1', etc. You must not...read more

Add your answer

Q17. Equilibrium Indices in a Sequence

You are given an array/list named 'SEQUENCE', which consists of 'N' integers. The task is to identify all equilibrium indices in this sequence.

Explanation:

An equilibrium inde...read more

Add your answer

Q18. Nuts and Bolts Problem

You are given a collection of 'N' nuts and 'N' bolts, each having unique sizes. Your objective is to match each nut with its corresponding bolt based on size, adhering to a one-to-one map...read more

Add your answer

Q19. Zig-Zag Array Rearrangement

You are provided with an array of distinct elements, and your task is to rearrange the array elements in a zig-zag manner. Specifically, for every odd index i, the element ARR[i] sho...read more

Add your answer

Q20. Reverse Linked List in K-Groups

Given a linked list consisting of 'N' nodes and an integer 'K', reverse the linked list in groups of size K. Specifically, reverse the nodes in each group starting from (1, K), (...read more

Add your answer

Q21. Merge Two Binary Trees Problem Statement

You are given the roots of two binary trees, root1 and root2. Merge these two trees into a new binary tree. If two nodes overlap, sum the node values as the new node val...read more

Add your answer

Q22. Reverse Linked List in Groups of K

You are provided with a linked list containing 'N' nodes and an integer 'K'. The task is to reverse the linked list in groups of size K, which means reversing the nodes in eac...read more

Add your answer

Q23. Nodes at Distance K from a Given Node

Given an arbitrary binary tree, a specified node within the tree, and an integer 'K', find all nodes that are exactly 'K' distance away from the specified node. Return a li...read more

Add your answer

Q24. Spiral Matrix Path Problem Statement

Given a N x M matrix of integers, print the spiral order of the matrix.

Input:

The input starts with an integer 'T' representing the number of test cases. Each test case con...read more

Add your answer

Q25. Reverse Linked List Problem Statement

Given a singly linked list of integers, return the head of the reversed linked list.

Example:

Initial linked list: 1 -> 2 -> 3 -> 4 -> NULL
Reversed linked list: 4 -> 3 -> 2...read more
Add your answer

Q26. Kth Ancestor in a Binary Tree

You are given an arbitrary binary tree consisting of N nodes numbered from 1 to N, an integer K, and a node TARGET_NODE_VAL from the tree. Your task is to find the Kth ancestor of ...read more

Add your answer

Q27. Find Nodes at Distance K in a Binary Tree

Your task is to find all nodes that are exactly a distance K from a given node in an arbitrary binary tree. The distance is defined as the number of edges between nodes...read more

Add your answer

Q28. Replace with Sum of Greater Nodes Problem Statement

Convert a given binary search tree (BST) with 'N' nodes into a Greater Tree. In the Greater Tree, each node's data should be updated to the sum of its origina...read more

Add your answer

Q29. Rotate Matrix K Times Problem Statement

Given a matrix, rotate its elements clockwise by 90 degrees, K times.

Each rotation by 90 degrees counts as one.

Input:

Line 1: Two integers M and N, denoting the number ...read more
Add your answer

Q30. Remove BST Keys Outside Given Range

Given a Binary Search Tree (BST) and a specified range [min, max], your task is to remove all keys from the BST that fall outside this range. The BST should remain valid afte...read more

Add your answer

Q31. Sum Root to Leaf Path Problem

You are given an arbitrary binary tree consisting of N nodes where each node is associated with an integer value from 1 to 9. Each root-to-leaf path in the tree represents a number...read more

Add your answer

Q32. Dijkstra's Shortest Path Problem Statement

You are given an undirected graph with V vertices (numbered from 0 to V-1) and E edges. Each edge connects two nodes u and v and has an associated weight representing ...read more

Add your answer

Q33. Binary Tree Level Order Traversal

You are given a binary tree of integers. Your task is to return the level order traversal of the given tree.

Input:

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

Q34. 0/1 Knapsack Problem Statement

A thief is planning to rob a store and can carry a maximum weight of 'W' in his knapsack. The store contains 'N' items where the ith item has a weight of 'wi' and a value of 'vi'....read more

Add your answer

Q35. Dijkstra's Shortest Path Problem

Given an undirected graph with ‘V’ vertices (labeled 0, 1, ... , V-1) and ‘E’ edges, where each edge has a weight representing the distance between two connected nodes (X, Y).

Y...read more

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

Interview Process at Consilium Safety

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

Top Software Developer Intern Interview Questions from Similar Companies

3.5
 • 50 Interview Questions
4.6
 • 16 Interview Questions
3.7
 • 13 Interview Questions
3.4
 • 12 Interview Questions
4.2
 • 12 Interview Questions
3.8
 • 12 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