Wipro Placement Papers 2024
Wipro Coding Questions 2025 - Elite NTH Programming Problems with Solutions
Practice 25+ Wipro placement paper coding questions with detailed solutions. Access Wipro Elite NTH programming logic questions and hands-on coding problems in C, C++, Java, Python for Wipro placement 2025-2026.
Wipro Placement Paper Coding Questions - Complete Guide
Section titled “Wipro Placement Paper Coding Questions - Complete Guide”Practice with 25+ Wipro placement paper coding questions covering the Wipro Elite NTH (National Talent Hunt) Online Programming Test. These questions are representative of what you’ll encounter in Wipro’s online assessment.
What’s Included:
- 25+ Coding Problems: Easy and Medium level problems with solutions
- Multiple Language Solutions: C, C++, Java, and Python solutions
- Time Complexity Analysis: Every solution includes complexity analysis
- Wipro-Specific Patterns: Focus on arrays, strings, mathematical operations
Wipro Placement Papers 2025
Complete Wipro Guide
Access complete Wipro placement papers guide with eligibility, process, and preparation strategy.
Wipro Elite NTH Coding Section Overview
Section titled “Wipro Elite NTH Coding Section Overview”Wipro Elite NTH Coding Section Breakdown:
| Section | Questions | Time | Difficulty | Focus Areas |
|---|---|---|---|---|
| Online Programming Test | 2 | 60 min | Easy-Medium | Arrays, strings, basic algorithms, math |
Languages Allowed: C, C++, Java, Python
Passing Criteria: Solve at least 1 problem completely with all test cases passing
Coding Problems by Category
Section titled “Coding Problems by Category”Sum of Array Elements
Problem: Find the sum of all elements in an array.
Example:
Input: [1, 2, 3, 4, 5]Output: 15Solution (Java):
public int arraySum(int[] arr) { int sum = 0; for (int num : arr) { sum += num; } return sum;}Solution (Python):
def array_sum(arr): return sum(arr)Solution (C):
int arraySum(int arr[], int n) { int sum = 0; for (int i = 0; i < n; i++) { sum += arr[i]; } return sum;}Time Complexity: O(n) | Space Complexity: O(1)
Find Maximum Element
Problem: Find the maximum element in an array.
Example:
Input: [3, 7, 2, 9, 1]Output: 9Solution (Java):
public int findMax(int[] arr) { int max = arr[0]; for (int num : arr) { if (num > max) { max = num; } } return max;}Solution (Python):
def find_max(arr): return max(arr)Time Complexity: O(n) | Space Complexity: O(1)
Second Largest Element
Problem: Find the second largest element without sorting.
Example:
Input: [12, 35, 1, 10, 34]Output: 34Solution (Java):
public int secondLargest(int[] arr) { int first = Integer.MIN_VALUE; int second = Integer.MIN_VALUE;
for (int num : arr) { if (num > first) { second = first; first = num; } else if (num > second && num != first) { second = num; } } return second;}Solution (Python):
def second_largest(arr): first = second = float('-inf') for num in arr: if num > first: second = first first = num elif num > second and num != first: second = num return secondTime Complexity: O(n) | Space Complexity: O(1)
Reverse Array
Problem: Reverse an array in-place.
Example:
Input: [1, 2, 3, 4, 5]Output: [5, 4, 3, 2, 1]Solution (Java):
public void reverseArray(int[] arr) { int left = 0, right = arr.length - 1; while (left < right) { int temp = arr[left]; arr[left] = arr[right]; arr[right] = temp; left++; right--; }}Solution (Python):
def reverse_array(arr): left, right = 0, len(arr) - 1 while left < right: arr[left], arr[right] = arr[right], arr[left] left += 1 right -= 1Time Complexity: O(n) | Space Complexity: O(1)
Rotate Array by K Positions
Problem: Rotate array to the left by k positions.
Example:
Input: arr = [1, 2, 3, 4, 5], k = 2Output: [3, 4, 5, 1, 2]Solution (Java):
public void rotateLeft(int[] arr, int k) { int n = arr.length; k = k % n; reverse(arr, 0, k - 1); reverse(arr, k, n - 1); reverse(arr, 0, n - 1);}
private void reverse(int[] arr, int start, int end) { while (start < end) { int temp = arr[start]; arr[start] = arr[end]; arr[end] = temp; start++; end--; }}Solution (Python):
def rotate_left(arr, k): n = len(arr) k = k % n return arr[k:] + arr[:k]Time Complexity: O(n) | Space Complexity: O(1)
Find Duplicate Elements
Problem: Check if array contains duplicates.
Example:
Input: [1, 2, 3, 1]Output: trueSolution (Java):
public boolean containsDuplicate(int[] nums) { Set<Integer> seen = new HashSet<>(); for (int num : nums) { if (seen.contains(num)) { return true; } seen.add(num); } return false;}Solution (Python):
def contains_duplicate(nums): return len(nums) != len(set(nums))Time Complexity: O(n) | Space Complexity: O(n)
Find Missing Number
Problem: Find missing number in array containing 1 to n.
Example:
Input: [1, 2, 4, 5, 6] (n = 6)Output: 3Solution (Java):
public int findMissing(int[] nums, int n) { int expectedSum = n * (n + 1) / 2; int actualSum = 0; for (int num : nums) { actualSum += num; } return expectedSum - actualSum;}Solution (Python):
def find_missing(nums, n): expected = n * (n + 1) // 2 return expected - sum(nums)Time Complexity: O(n) | Space Complexity: O(1)
Reverse a String
Problem: Reverse a given string.
Example:
Input: "hello"Output: "olleh"Solution (Java):
public String reverseString(String s) { char[] chars = s.toCharArray(); int left = 0, right = chars.length - 1; while (left < right) { char temp = chars[left]; chars[left] = chars[right]; chars[right] = temp; left++; right--; } return new String(chars);}Solution (Python):
def reverse_string(s): return s[::-1]Time Complexity: O(n) | Space Complexity: O(n)
Check Palindrome String
Problem: Check if a string is palindrome.
Example:
Input: "madam"Output: trueSolution (Java):
public boolean isPalindrome(String s) { s = s.toLowerCase(); int left = 0, right = s.length() - 1; while (left < right) { if (s.charAt(left) != s.charAt(right)) { return false; } left++; right--; } return true;}Solution (Python):
def is_palindrome(s): s = s.lower() return s == s[::-1]Time Complexity: O(n) | Space Complexity: O(1)
Count Vowels and Consonants
Problem: Count vowels and consonants in a string.
Example:
Input: "Hello World"Output: Vowels: 3, Consonants: 7Solution (Java):
public int[] countVowelsConsonants(String s) { int vowels = 0, consonants = 0; s = s.toLowerCase(); for (char c : s.toCharArray()) { if (Character.isLetter(c)) { if ("aeiou".indexOf(c) != -1) { vowels++; } else { consonants++; } } } return new int[]{vowels, consonants};}Solution (Python):
def count_vowels_consonants(s): vowels = set('aeiouAEIOU') v = c = 0 for char in s: if char.isalpha(): if char in vowels: v += 1 else: c += 1 return v, cTime Complexity: O(n) | Space Complexity: O(1)
Reverse Words in String
Problem: Reverse the order of words in a string.
Example:
Input: "the sky is blue"Output: "blue is sky the"Solution (Java):
public String reverseWords(String s) { String[] words = s.trim().split("\\s+"); StringBuilder result = new StringBuilder(); for (int i = words.length - 1; i >= 0; i--) { result.append(words[i]); if (i > 0) result.append(" "); } return result.toString();}Solution (Python):
def reverse_words(s): return ' '.join(s.split()[::-1])Time Complexity: O(n) | Space Complexity: O(n)
Check Anagram
Problem: Check if two strings are anagrams.
Example:
Input: s1 = "listen", s2 = "silent"Output: trueSolution (Java):
public boolean isAnagram(String s1, String s2) { if (s1.length() != s2.length()) return false; int[] count = new int[26]; for (int i = 0; i < s1.length(); i++) { count[s1.charAt(i) - 'a']++; count[s2.charAt(i) - 'a']--; } for (int c : count) { if (c != 0) return false; } return true;}Solution (Python):
def is_anagram(s1, s2): return sorted(s1.lower()) == sorted(s2.lower())Time Complexity: O(n) | Space Complexity: O(1)
First Non-Repeating Character
Problem: Find first non-repeating character.
Example:
Input: "leetcode"Output: 'l'Solution (Java):
public char firstUnique(String s) { int[] count = new int[26]; for (char c : s.toCharArray()) { count[c - 'a']++; } for (char c : s.toCharArray()) { if (count[c - 'a'] == 1) { return c; } } return '\0';}Solution (Python):
def first_unique(s): from collections import Counter count = Counter(s) for char in s: if count[char] == 1: return char return NoneTime Complexity: O(n) | Space Complexity: O(1)
Check Prime Number
Problem: Determine if a number is prime.
Example:
Input: 17Output: trueSolution (Java):
public boolean isPrime(int n) { if (n <= 1) return false; if (n <= 3) return true; if (n % 2 == 0 || n % 3 == 0) return false; for (int i = 5; i * i <= n; i += 6) { if (n % i == 0 || n % (i + 2) == 0) { return false; } } return true;}Solution (Python):
def is_prime(n): if n <= 1: return False if n <= 3: return True if n % 2 == 0 or n % 3 == 0: return False i = 5 while i * i <= n: if n % i == 0 or n % (i + 2) == 0: return False i += 6 return TrueTime Complexity: O(√n) | Space Complexity: O(1)
Factorial
Problem: Calculate factorial of a number.
Example:
Input: 5Output: 120Solution (Java):
public long factorial(int n) { if (n <= 1) return 1; long result = 1; for (int i = 2; i <= n; i++) { result *= i; } return result;}Solution (Python):
def factorial(n): if n <= 1: return 1 result = 1 for i in range(2, n + 1): result *= i return resultTime Complexity: O(n) | Space Complexity: O(1)
Fibonacci Series
Problem: Generate Fibonacci series up to n terms.
Example:
Input: n = 7Output: [0, 1, 1, 2, 3, 5, 8]Solution (Java):
public int[] fibonacci(int n) { if (n <= 0) return new int[]{}; int[] fib = new int[n]; fib[0] = 0; if (n > 1) fib[1] = 1; for (int i = 2; i < n; i++) { fib[i] = fib[i-1] + fib[i-2]; } return fib;}Solution (Python):
def fibonacci(n): if n <= 0: return [] fib = [0, 1] for i in range(2, n): fib.append(fib[-1] + fib[-2]) return fib[:n]Time Complexity: O(n) | Space Complexity: O(n)
GCD of Two Numbers
Problem: Find GCD using Euclidean algorithm.
Example:
Input: a = 48, b = 18Output: 6Solution (Java):
public int gcd(int a, int b) { while (b != 0) { int temp = b; b = a % b; a = temp; } return a;}Solution (Python):
def gcd(a, b): while b: a, b = b, a % b return aTime Complexity: O(log(min(a,b))) | Space Complexity: O(1)
Sum of Digits
Problem: Find sum of digits of a number.
Example:
Input: 12345Output: 15Solution (Java):
public int sumOfDigits(int n) { int sum = 0; n = Math.abs(n); while (n > 0) { sum += n % 10; n /= 10; } return sum;}Solution (Python):
def sum_of_digits(n): return sum(int(d) for d in str(abs(n)))Time Complexity: O(d) | Space Complexity: O(1)
Armstrong Number
Problem: Check if number is Armstrong number.
Example:
Input: 153Output: true (1³ + 5³ + 3³ = 153)Solution (Java):
public boolean isArmstrong(int n) { int original = n; int digits = String.valueOf(n).length(); int sum = 0; while (n > 0) { int digit = n % 10; sum += Math.pow(digit, digits); n /= 10; } return sum == original;}Solution (Python):
def is_armstrong(n): digits = len(str(n)) return sum(int(d)**digits for d in str(n)) == nTime Complexity: O(d) | Space Complexity: O(1)
Palindrome Number
Problem: Check if number is palindrome.
Example:
Input: 121Output: trueSolution (Java):
public boolean isPalindrome(int x) { if (x < 0) return false; int original = x; int reversed = 0; while (x > 0) { reversed = reversed * 10 + x % 10; x /= 10; } return original == reversed;}Solution (Python):
def is_palindrome(x): if x < 0: return False return str(x) == str(x)[::-1]Time Complexity: O(log n) | Space Complexity: O(1)
Right Triangle Pattern
Problem: Print right triangle with n rows.
Example:
Input: n = 5Output:***************Solution (Java):
public void rightTriangle(int n) { for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { System.out.print("*"); } System.out.println(); }}Solution (Python):
def right_triangle(n): for i in range(1, n + 1): print('*' * i)Time Complexity: O(n²) | Space Complexity: O(1)
Pyramid Pattern
Problem: Print pyramid with n rows.
Example:
Input: n = 5Output: * *** ***** ****************Solution (Java):
public void pyramid(int n) { for (int i = 1; i <= n; i++) { for (int j = 1; j <= n - i; j++) { System.out.print(" "); } for (int j = 1; j <= 2 * i - 1; j++) { System.out.print("*"); } System.out.println(); }}Solution (Python):
def pyramid(n): for i in range(1, n + 1): print(' ' * (n - i) + '*' * (2 * i - 1))Time Complexity: O(n²) | Space Complexity: O(1)
Number Pattern
Problem: Print number pattern.
Example:
Input: n = 5Output:112123123412345Solution (Java):
public void numberPattern(int n) { for (int i = 1; i <= n; i++) { for (int j = 1; j <= i; j++) { System.out.print(j); } System.out.println(); }}Solution (Python):
def number_pattern(n): for i in range(1, n + 1): for j in range(1, i + 1): print(j, end='') print()Time Complexity: O(n²) | Space Complexity: O(1)
Practice Tips for Wipro Elite NTH
Section titled “Practice Tips for Wipro Elite NTH”Master One Language
- Choose C, C++, Java, or Python
- Know standard library functions
- Practice writing code quickly
- Handle input/output properly
Focus on Common Patterns
- Array manipulation
- String processing
- Mathematical operations
- Pattern printing
Time Management
- 30 minutes per problem
- Read problem carefully
- Test with given examples
- Handle edge cases
Common Mistakes to Avoid
- Off-by-one errors
- Not handling empty inputs
- Integer overflow
- Wrong output format
Related Resources
Section titled “Related Resources”Wipro 2024 Papers
Previous year papers with coding questions
Wipro 2025 Papers
Latest papers with current year questions
Wipro Aptitude Questions
Aptitude questions with solutions
Wipro Interview Experience
Real interview experiences
Wipro Preparation Guide
Comprehensive preparation strategy
Wipro Main Page
Complete Wipro placement guide
Practice Wipro coding questions regularly! Focus on array manipulation, string processing, and mathematical problems. These are the most common problem types in Wipro Elite NTH.
Pro Tip: Wipro values working code that handles all test cases. Focus on correctness first, then optimize if time permits.
Last updated: February 2026