Add office photos
Procol logo
Engaged Employer

Procol

Verified
4.0
based on 33 Reviews
Filter interviews by
Designation
Fresher

Procol Interview Questions and Answers

Updated 5 Feb 2024

Q1. Power of a Number Problem

You are given two integers, X and N. Your task is to compute the value of X raised to the power of N (i.e., X^N).

Input:

The first line contains an integer T, the number of test cases....read more
Ans.

Compute the value of X raised to the power of N for given integers X and N.

  • Read the number of test cases T

  • For each test case, read the values of X and N

  • Calculate X^N for each test case

  • Print the result of X^N for each test case

Add your answer
right arrow

Q2. Minimum Operations to Equalize Array

Given an integer array ARR of length N where ARR[i] = (2*i + 1), determine the minimum number of operations required to make all the elements of ARR equal. In a single opera...read more

Ans.

The minimum number of operations required to make all elements of the given array equal.

  • Calculate the target value as the sum of all elements divided by the length of the array.

  • Find the absolute difference between each element and the target value to determine the number of operations needed.

  • Return the sum of all absolute differences as the minimum number of operations required.

Add your answer
right arrow
Procol Interview Questions and Answers for Freshers
illustration image

Q3. Game of Dominoes Problem Statement

Rafiq loves to play with piles of dominoes, especially when they are of equal heights. His father gifted him 'N' piles of dominoes, each with a positive number of stacked domi...read more

Ans.

Calculate minimum cost to make consecutive windows of domino piles equal in height.

  • Iterate through each window of size K and calculate the minimum cost to make piles equal in height.

  • Keep track of the running sum of domino heights in each window.

  • For each window, find the median height and calculate the cost to make all piles equal to the median height.

Add your answer
right arrow

Q4. String Ka Khel Problem Statement

Ninja is creating a new game ‘String Ka Khel’ for his gaming shop. In this game, players are given ‘N’ strings. The objective is to find the maximum length of strings that can b...read more

Ans.

Compute the maximum length of a string that can be formed by joining given strings based on a specific condition.

  • Iterate through each string and store the count of strings ending with 'R' and 'B'.

  • Check if there are any strings ending with 'R' and 'B' that can be combined to form a longer string.

  • Return the maximum length of the string that can be formed or 0 if no combination is possible.

Add your answer
right arrow
Discover Procol interview dos and don'ts from real experiences
Q5. ...read more

Implement Stack with Linked List

Your task is to implement a Stack data structure using a Singly Linked List.

Explanation:

Create a class named Stack which supports the following operations, each in O(1) time:

Ans.

Implement a Stack data structure using a Singly Linked List with operations in O(1) time.

  • Create a class named Stack with methods getSize, isEmpty, push, pop, and getTop.

  • Use a Singly Linked List to store the elements of the stack.

  • Ensure each operation runs in O(1) time complexity.

  • Handle edge cases like empty stack appropriately.

  • Implement the logic for each operation as specified in the question.

  • Test the implementation with sample input and output provided in the question.

Add your answer
right arrow

Q6. Pair Sum Problem Statement

You are given an integer array 'ARR' of size 'N' and an integer 'S'. Your task is to find and return a list of all pairs of elements where each sum of a pair equals 'S'.

Note:

Each pa...read more

Ans.

Find pairs of elements in an array that sum up to a given value, sorted in a specific order.

  • Iterate through the array and for each element, check if the complement exists in a hash set.

  • Sort the pairs based on the first element and then the second element.

  • Use a hash set to store elements as you iterate through the array to avoid duplicates.

  • Return the list of pairs that satisfy the sum condition.

Add your answer
right arrow

Q7. Search in Infinite Sorted 0-1 Array Problem Statement

You are provided with an infinite sorted array that consists exclusively of 0s followed by 1s. Your task is to determine the index of the first occurrence o...read more

Ans.

Find the index of the first occurrence of 1 in an infinite sorted 0-1 array.

  • Use binary search to efficiently find the index of the first occurrence of 1.

  • Keep doubling the search range until you find a range that contains 1.

  • Update the search range based on the value at the mid index.

  • Return the index of the first occurrence of 1 once found.

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

Interview Process at Procol

based on 4 interviews
Interview experience
2.8
Poor
View more
interview tips and stories logo
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Interview Questions from Similar Companies

 UST Logo
3.8
 • 334 Interview Questions
HCL Group Logo
3.6
 • 262 Interview Questions
Dr. Reddy's Logo
4.0
 • 258 Interview Questions
Schneider Electric Logo
4.1
 • 214 Interview Questions
Zensar Technologies Logo
3.7
 • 180 Interview Questions
Statestreet HCL Services Logo
3.3
 • 142 Interview Questions
View all
Recently Viewed
LIST OF COMPANIES
Lummus Technology
Overview
INTERVIEWS
Procol
No Interviews
REVIEWS
PowerSchool India
No Reviews
INTERVIEWS
Ketto
No Interviews
INTERVIEWS
Voylla
No Interviews
REVIEWS
Tata Projects
No Reviews
DESIGNATION
REVIEWS
Lummus Technology
No Reviews
INTERVIEWS
Senco Gold
No Interviews
INTERVIEWS
SaaS Labs
No Interviews
Top Procol Interview Questions And Answers
Share an Interview
Stay ahead in your career. Get AmbitionBox app
play-icon
play-icon
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
75 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