IT Codes ZoneWipro

Wipro Previous Coding Questions

πŸ”₯ Wipro Previous Coding Questions with Java & Python Solutions

Welcome to this carefully curated post featuring Wipro Previous Coding Questions asked in real campus placements and technical assessments.

Each problem includes:

βœ… A clear and beginner-friendly problem statement
βœ… Java and Python code solutions
βœ… Sample input and output formats
βœ… Easy-to-understand explanation of the logic

Whether you’re preparing for Wipro’s Elite NTH, Turbo hiring, or just practicing for coding rounds β€” this guide will help you strengthen your logic and problem-solving skills.

Let’s get started and crack that Wipro coding round! πŸ’»πŸš€


βœ… Problem 1: Lowest Number in the List

πŸ“ Problem Statement

Given a list of integers, find the lowest (minimum) number in the list.

πŸ”’ Input

  • First line: An integer n representing the number of elements
  • Second line: n space-separated integers

🧾 Output

  • The smallest integer in the list

βœ… Example

Input:
5
4 9 1 7 3


Output:
1

πŸ”£Code

πŸ” Explanation

Loop through all numbers and track the smallest value found.

βœ… Problem 2: Find Missing Numbers Between Lists

πŸ“ Problem Statement

You are given three lists: A, B, and C.

  • B contains all the elements of A except one.
  • C contains all the elements of B except one.

Your task is to determine which two numbers are missingβ€”

  • First, find the number that is in A but not in B.
  • Second, find the number that is in B but not in C.

πŸ”’ Input

  • An integer N
  • A list of N integers (A)
  • A list of N-1 integers (B)
  • A list of N-2 integers (C)

🧾 Output

  • Print the two missing numbers on separate lines.

βœ… Example

Input:
5
4 5 3 2 1
5 3 2 1
3 1 2
Output:
4
5

πŸ”£Code

πŸ” Explanation

Subtract the partial list from the original using set operations.

βœ… Problem 3: Add Up the Evens

πŸ“ Problem Statement

Given a list of numbers, find the sum of all even numbers in the list.

πŸ”’ Input

  • First line: Integer n, the number of elements
  • Second line: n space-separated integers

🧾 Output

  • Single integer representing the sum of even numbers

βœ… Example

Input:
6 1 2 3 4 5 6
Output:
12

πŸ”£Code

πŸ” Explanation

Use modulo to check if a number is even and then sum it up.

βœ… Problem 4: Clockwise Angle Between Hour Marks

πŸ“ Problem Statement

Given two numbers representing hour marks on a clock (1–12), find the clockwise angle between them.

πŸ”’ Input

  • Two integers between 1 and 12

🧾 Output

  • The clockwise angle between them in degrees (each hour = 30Β°)

βœ… Example

Input:
3 6
Output:
90

πŸ”£Code

πŸ” Explanation

There are 12 hour marks, and each mark is 30Β°. Calculate clockwise difference modulo 12.

βœ… Problem 5: GCD of Two Numbers

πŸ“ Problem Statement

Find the Greatest Common Divisor (GCD) of two given integers.

πŸ”’ Input

  • Two space-separated integers from a single line: a b

🧾 Output

  • A single integer representing their GCD

βœ… Example

Input:
12 18
Output:
6

πŸ”£Code

πŸ” Explanation

We use the Euclidean algorithm. If b is 0, a is the GCD; otherwise, recurse with b and a % b.

βœ… Problem 6: GCD of Three Numbers

πŸ“ Problem Statement

Compute the GCD of three integers.

πŸ”’ Input

  • Three space-separated integers: a b c

🧾 Output

  • Single integer: GCD of all three numbers

βœ… Example

Input:
15 30 45
Output:
15

πŸ”£Code

πŸ” Explanation

Find the GCD of first two numbers, then compute GCD of the result with the third number.

βœ… Problem 7: Check if a Number is Prime

πŸ“ Problem Statement

Determine whether a given number is a prime number.

πŸ”’ Input

  • A single integer n

🧾 Output

  • Print Prime if the number is prime, otherwise print not prime

βœ… Example

Input:
7
Output:
Prime

πŸ”£Code

πŸ” Explanation

We check for divisibility from 2 to √n. If divisible, it’s not prime.

βœ… Problem 8: Display Distinct Elements of an Array

πŸ“ Problem Statement

Print all distinct elements from the input list while preserving the order of first appearance.

πŸ”’ Input

  • Space-separated integers on a single line

🧾 Output

  • Space-separated integers with duplicates removed

βœ… Example

Input:
1 2 2 3 4 3 5
Output:
1 2 3 4 5

πŸ”£Code

πŸ” Explanation

Use a set to track seen elements and ensure no duplicates are printed.

βœ… Problem 9: Remove Vowels from a String

πŸ“ Problem Statement

Remove all vowels (a, e, i, o, u) from the input string.

πŸ”’ Input

  • A single line string

🧾 Output

  • The string with vowels removed

βœ… Example

Input:
ChatGPT is awesome
Output:
ChtGPT s wsm

πŸ”£Code

πŸ” Explanation

We filter out vowels using list comprehension (Python) or regex (Java).

βœ… Problem 10: Sum of All Odd Digits in a Number

πŸ“ Problem Statement

Find the sum of all odd digits in the given number.

πŸ”’ Input

  • A single integer

🧾 Output

  • Sum of all odd digits

βœ… Example

Input:
53821
Output:
17
(5 + 3 + 1 + 7)

πŸ”£Code

πŸ” Explanation

Traverse each digit and check if it’s odd using % 2 != 0, then add to the total.

βœ… Problem 11: Transpose of a Matrix

πŸ“ Problem Statement

Find the transpose of the given matrix.

πŸ”’ Input

  • First line: Two integers r c (rows and columns)
  • Next r lines: Each line has c integers

🧾 Output

  • The transposed matrix (columns become rows)

βœ… Example

Input:
2 3
1 2 3
4 5 6


Output:
1 4
2 5
3 6

πŸ”£Code

πŸ” Explanation

Transpose means flipping rows to columns. We switch matrix[i][j] to matrix[j][i].

βœ… Problem 12: Matrix Multiplication

πŸ“ Problem Statement

Multiply two matrices A and B and print the result.

πŸ”’ Input

  • First line: Two integers r1 c1 (rows and columns of A)
  • Next r1 lines: c1 integers each (Matrix A)
  • Then: Two integers r2 c2 (rows and columns of B)
  • Next r2 lines: c2 integers each (Matrix B)

🧾 Output

  • Resultant matrix after multiplying A and B

βœ… Example

Input:
2 2
1 2
3 4
2 2
5 6
7 8


Output:
19 22
43 50

πŸ”£Code

πŸ” Explanation

Standard matrix multiplication: A[i][k] * B[k][j] for all valid k, summed over.

βœ… Problem 13: Check Balance of Parentheses

πŸ“ Problem Statement

Check if the parentheses in a string are balanced (( ), { }, [ ]).

πŸ”’ Input

  • A string containing brackets

🧾 Output

  • Print Balanced or Not Balanced

βœ… Example

Input:
({[]})
Output:
Balanced

πŸ”£Code

πŸ” Explanation

Use a stack to match opening and closing brackets. Ensure stack is empty at end.

🚨 Wipro Overview!

Curious about how Wipro’s selection process works, the rounds involved, and other key details? Don’t miss this complete breakdown:
🌐 https://nextgenkodinghub.in/wipro-overview/

Wishing you the best of luck! πŸ’Όβœ¨


Thanks for visiting! Explore the categories below for more exciting and useful content.


Leave a Reply

Your email address will not be published. Required fields are marked *