Add office photos
Employer?
Claim Account for FREE

Grey Orange

3.2
based on 328 Reviews
Video summary
Filter interviews by

Steag Energy Services Interview Questions and Answers

Updated 5 Feb 2024

Q1. Print All Permutations of a String

Given an input string STR, generate and print all possible permutations of the string.

Input:

str

Output:

All permutations of the input string, each on a new line.

Example:

In...read more
Add your answer

Q2. Longest Consecutive Sequence Problem Statement

You are provided with an unsorted array/list ARR of N integers. Your task is to determine the length of the longest consecutive sequence present in the array.

Expl...read more

Ans.

The task is to find the length of the longest consecutive sequence in an unsorted array of integers.

  • Sort the array to bring consecutive numbers together

  • Iterate through the sorted array and keep track of the current consecutive sequence length

  • Update the maximum length if a longer sequence is found

Add your answer

Q3. Nth Fibonacci Number Problem Statement

Calculate the Nth term in the Fibonacci sequence, where the sequence is defined as follows: F(n) = F(n-1) + F(n-2), with initial conditions F(1) = F(2) = 1.

Input:

The inp...read more
Ans.

The program calculates the Nth Fibonacci number using a recursive formula.

  • The Fibonacci series starts with 1, 1, and each subsequent number is the sum of the two preceding numbers.

  • The program uses a recursive function to calculate the Nth Fibonacci number.

  • The time complexity of the program is O(2^N), which can be optimized using memoization or dynamic programming.

Add your answer

Q4. Reverse the String Problem Statement

You are given a string STR which contains alphabets, numbers, and special characters. Your task is to reverse the string.

Example:

Input:
STR = "abcde"
Output:
"edcba"

Input...read more

Ans.

The task is to reverse a given string containing lowercase letters, uppercase letters, digits, and special characters.

  • Iterate through the string from the last character to the first character and append each character to a new string.

  • Alternatively, you can use built-in string reversal functions or methods available in your programming language.

  • To solve the follow-up question with O(1) space complexity, you can use a two-pointer approach. Initialize two pointers, one at the be...read more

Add your answer
Discover Steag Energy Services interview dos and don'ts from real experiences

Q5. Rectangle Area Calculation

Given a list of rectangles, where each rectangle is represented by an array of four integers indicating its bottom-left and top-right corners, calculate the total area covered by all ...read more

Add your answer

Q6. Bit Set Problem Statement

You are provided with a string, termed as DIGIT_PATTERN, which consists solely of digits. The objective is to identify the first digit that repeats in the sequence. If there's no repea...read more

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

Interview Process at Steag Energy Services

based on 1 interviews
Interview experience
5.0
Excellent
View more
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Top Software Engineer Interview Questions from Similar Companies

3.3
 • 79 Interview Questions
3.5
 • 49 Interview Questions
3.4
 • 41 Interview Questions
2.7
 • 40 Interview Questions
2.7
 • 12 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