Wipro Coding Questions | Automata Programming Challenges

Wipro Coding Questions | Automata Programming Challenges

Wipro Coding Questions | Automata Programming Challenges

Are you preparing for Wipro Elite NTH 2025? The Wipro Elite National Talent Hunt is one of the most sought-after recruitment drives, and excelling in the coding section is crucial for securing your spot. To assist you, we’ve compiled a list of Wipro coding questions from previous years, along with solutions to enhance your preparation.

Wipro Elite NTH Coding Test: Overview

The Wipro Elite NTH coding test consists of two coding questions to be solved within 60 minutes. You can code in C, C++, Java, or Python. The questions typically test:

  • Algorithmic Problem Solving
  • Data Structures
  • Basic Programming Concepts

Wipro Elite NTH Coding Questions & Solutions

1. Minimum Cost to Buy N Apples

Problem Statement:

Josh needs exactly N apples. He has two purchase options:

  • Shop A: Sells apples in lots of M1 at price P1.
  • Shop B: Sells apples in lots of M2 at price P2.

Josh can only buy full lots. Determine the minimum cost to purchase N apples.

Sample Input:

19
3 10
4 15

Sample Output:

65

Solution Approach:

  • Compare cost-effectiveness of buying from Shop A vs. Shop B.
  • Calculate the minimum possible cost to reach N apples.

2. Implement Bubble Sort

Problem Statement:

Sort an array of N integers using the Bubble Sort algorithm.

Sample Input:

6
11 15 26 38 9 10

Sample Output:

9 10 11 15 26 38

Solution Approach:

  • Compare adjacent elements and swap if necessary.
  • Repeat the process until the array is sorted.

3. Even Numbers First

Problem Statement:

Given N numbers, rearrange them so that all even numbers appear before odd numbers.

Sample Input:

8
10 98 3 33 12 22 21 11

Sample Output:

10 98 12 22 3 33 21 11

Solution Approach:

  • Iterate through the list and separate even and odd numbers.
  • Concatenate the even and odd lists for the final result.

4. Maximum Signal in Binary Data

Problem Statement:

Given a binary string (0s and 1s), find the longest consecutive sequence of either 1s or 0s, excluding the start and end.

Sample Input:

6
101000

Sample Output:

1

Solution Approach:

  • Traverse the string and identify longest consecutive sequences.
  • Ensure the sequence is not at the start or end.

5. Palindromic Time Calculation

Problem Statement:

Find the minimum time required for the minute value of a given 24-hour time format (HH:MM) to become a palindrome.

Sample Input:

05:39

Sample Output:

11

Solution Approach:

  • Increment time minute by minute.
  • Check if the resulting time forms a palindrome.

6. Spiral Matrix Traversal

Problem Statement:

Given an N x N matrix, print its elements in spiral order.

Sample Input:

3
1 2 3
4 5 6
7 8 9

Sample Output:

1 2 3 6 9 8 7 4 5

Solution Approach:

  • Maintain boundaries (top, bottom, left, right).
  • Traverse in a spiral order, updating boundaries accordingly.

7: Reverse Words in a String

Problem Statement:

You are given a string containing multiple words separated by spaces. Your task is to reverse the words while keeping the order of characters in each word unchanged.

Input:

  • A single line containing a string S.

Output:

  • Print the modified string with words in reverse order.

Sample Input:

Hello World from Wipro

Sample Output:

Wipro from World Hello

Solution:

To solve this, split the string into words, reverse their order, and join them back.


8: Find the First Non-Repeating Character

Problem Statement:

Given a string, find the first non-repeating character and print it. If all characters are repeating, print -1.

Input:

  • A single string S.

Output:

  • The first non-repeating character or -1 if none exists.

Sample Input:

swiss

Sample Output:

w

Solution:

Use a hash map to count occurrences and find the first character appearing only once.


9: Count Frequency of Characters

Problem Statement:

Given a string S, count the frequency of each character and print them in the order they appear.

Input:

  • A single string S.

Output:

  • Each character with its frequency.

Sample Input:

apple

Sample Output:

a:1 p:2 l:1 e:1

Solution:

Iterate through the string and maintain a dictionary to store and print frequencies.


10: Find Missing Number in an Array

Problem Statement:

Given an array of N-1 integers from 1 to N (one number is missing), find the missing number.

Input:

  • First line: Integer N (size of the full sequence).
  • Second line: N-1 space-separated integers.

Output:

  • The missing number.

Sample Input:

5
1 2 3 5

Sample Output:

4

Solution:

Use the formula for the sum of the first N natural numbers and subtract the given sum.


11: Matrix Diagonal Sum

Problem Statement:

Given an N × N matrix, find the sum of its diagonals.

Input:
  • First line: Integer N (size of the matrix).
  • Next N lines: N space-separated integers.
Output:
  • The sum of both diagonals.

Sample Input:

3
1 2 3
4 5 6
7 8 9

Sample Output:

25

Solution:

Sum up elements where row index equals column index and reverse diagonals.


Conclusion

These Wipro coding questions give you an insight into the type of problems that may appear in the Wipro Elite NTH coding round. Mastering these problems will significantly improve your chances of success. If you need more such questions to practice,  where we offer access to a vast collection of placement-specific coding problems.

Wipro Coding Questions
c