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 *