The Online Programming Test gives you 2 problems in 60 minutes, to be solved in C, C++, Java or Python. Problem 1 is typically easy (arrays, strings, counting); problem 2 is moderate (two-pointer logic, hashing, simulation). Your code must pass hidden test cases, not just the visible example — handle edge cases and exact output format.
What Wipro coding questions test
- Array traversal, counting and frequency maps
- String manipulation and character-by-character simulation
- Two-pointer and stack-based techniques
- Basic math and pattern logic
- Reading input / printing output exactly as specified
Practice real Wipro coding problems
These problems appeared in memory-based Wipro papers. Try each one yourself before revealing the approach and solution — solutions are provided in Python, Java and C++.
Alex works at a clothing store with a large pile of socks that must be paired by colour. Given an integer n (the number of socks) and an array of n integers representing the colour of each sock, determine how many matching pairs of socks can be formed.
Input: n = 7, ar = [1, 2, 1, 2, 1, 3, 2]
Output: 2
There is one pair of colour 1 and one pair of colour 2. The odd socks (one of colour 1, one of colour 2, one of colour 3) remain unpaired.
- 1 ≤ n ≤ 50
- 1 ≤ ar[i] ≤ 100
Gary is an avid hiker who tracks every step. For each step he notes whether it was uphill (U) or downhill (D). His hikes always start and end at sea level. A valley is a sequence of consecutive steps below sea level, starting with a step down from sea level and ending with a step up to sea level. Given the sequence of Gary's steps, print the number of valleys he walked through.
Input: n = 8, path = "UDDDUDUU"
Output: 1
Gary first climbs up then descends into a valley 2 units deep, and finally climbs out — exactly one valley.
- 2 ≤ n ≤ 10^6
- path contains only the characters U and D
Two children are typing words on an old typewriter. When they make a mistake they press the # key, which acts as a backspace and deletes the last character typed (pressing # on empty text does nothing). Given two typed strings S and T, determine whether they produce identical final text strings.
Input: S = "ab#c", T = "ad#c"
Output: true
Both strings evaluate to "ac".
Input: S = "a#c", T = "b"
Output: false
S evaluates to "c" while T evaluates to "b".
- 1 ≤ |S|, |T| ≤ 10^5
- S and T contain only lowercase letters and the # character
The visible test case passing does NOT mean you will clear the hidden cases — test your code mentally against empty inputs, single elements and maximum sizes before submitting. Targeting the Turbo upgrade? Brute force will pass Elite, but Turbo demands optimized (O(n) or O(n log n)) solutions.


