Add office photos
Employer?
Claim Account for FREE

NCR Voyix

3.9
based on 1.5k Reviews
Filter interviews by

CriticalRiver Interview Questions and Answers

Updated 5 Feb 2024
Popular Designations

Q1. Longest Palindromic Substring Problem Statement

You are provided with a string STR of length N. The goal is to identify the longest palindromic substring within this string. In cases where multiple palindromic ...read more

Ans.

Given a string, find the longest palindromic substring, prioritizing the one with the smallest start index.

  • Iterate through the string and expand around each character to find palindromes

  • Keep track of the longest palindrome found and its starting index

  • Return the longest palindromic substring with the smallest start index

Add your answer

Q2. Partition Array Minimizing Subset Sum Difference

Given an array containing N non-negative integers, your task is to partition this array into two subsets such that the absolute difference between their sums is ...read more

Ans.

The task is to partition an array into two subsets such that the absolute difference between subset sums is minimum.

  • Iterate through all possible subsets of the array

  • Calculate the sum of each subset

  • Find the minimum absolute difference between the subset sums

Add your answer

Q3. Reverse a Doubly Linked List

Given a doubly linked list of positive integers with size 'N', reverse the list and return the head of the modified list.

Explanation:

A doubly linked list allows traversal in both ...read more

Ans.

The task is to reverse a given doubly linked list and return the head of the modified list.

  • Create three pointers: prev, current, and next.

  • Iterate through the linked list and update the next and prev pointers for each node.

  • Finally, update the head pointer to the last node visited and return it as the head of the reversed list.

Add your answer

Q4. Prime Time Again Problem Statement

You are given two integers DAY_HOURS and PARTS. Consider a day with DAY_HOURS hours, which can be divided into PARTS equal parts. Your task is to determine the total instances...read more

Ans.

Count the total instances of equivalent prime groups in a day divided into equal parts.

  • Divide the day into equal parts and check for prime groups at the same position in different parts.

  • Each prime group should consist of prime numbers occurring at different parts of the day.

  • Return the total number of equivalent prime groups found.

  • Example: For DAY_HOURS = 20 and PARTS = 2, there are 2 prime groups: 3-13 and 7-17.

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

Q5. Find the Third Greatest Element

Given an array 'ARR' of 'N' distinct integers, determine the third largest element in the array.

Input:

The first line contains a single integer 'T' representing the number of te...read more
Ans.

Find the third largest element in an array of distinct integers.

  • Sort the array in descending order and return the element at index 2.

  • Handle cases where there are less than 3 elements in the array.

  • Consider edge cases like negative integers and duplicates.

Add your answer

Q6. Sort Elements by Frequency

Your task is to sort a list of repeated integers by their frequency in decreasing order. The element with the highest frequency should appear first. If two elements have the same freq...read more

Ans.

The task is to sort a list of integers based on their frequency of repetition, with the element with the highest frequency first.

  • Count the frequency of each element in the list using a dictionary.

  • Sort the elements based on their frequency in descending order.

  • If two elements have the same frequency, maintain their original order.

  • Return the sorted list.

Add your answer

Q7. Count Distinct Ways to Reach the Nth Stairs

Consider a scenario where you have been given a number of stairs. You start at the 0th stair and need to reach the Nth stair. With each stride, you can choose to eith...read more

Ans.

The task is to find the number of distinct ways to move from the 0th to the Nth stair by ascending one or two steps at a time.

  • Use dynamic programming to solve this problem efficiently.

  • The number of ways to reach the Nth stair is the sum of the number of ways to reach the (N-1)th stair and the number of ways to reach the (N-2)th stair.

  • Handle base cases for N=0 and N=1 separately.

  • Consider using memoization to avoid redundant calculations.

  • Example: For N=3, the number of distinct...read more

View 1 answer
Q8. Can you describe your projects and the tech stack you used in them?
Ans.

I have worked on projects involving web development, machine learning, and mobile app development using technologies such as React, Python, and Flutter.

  • Web development project using React and Node.js for frontend and backend

  • Machine learning project using Python and TensorFlow for model training and deployment

  • Mobile app development project using Flutter for cross-platform app development

Add your answer
Contribute & help others!
Write a review
Share interview
Contribute salary
Add office photos
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Developer Intern Interview Questions from Similar Companies

4.0
 • 66 Interview Questions
4.4
 • 30 Interview Questions
3.8
 • 25 Interview Questions
3.7
 • 12 Interview Questions
4.0
 • 11 Interview Questions
3.7
 • 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