Skip to content

Accenture Coding Questions 2025 - NLT Coding Test Problems with Solutions

Practice 20+ Accenture placement paper coding questions with detailed solutions. Access Accenture NLT coding test problems in Java, Python, C++ for Accenture placement 2025-2026.

Accenture Placement Paper Coding Questions - Complete Guide

Section titled “Accenture Placement Paper Coding Questions - Complete Guide”

Practice with 20+ Accenture placement paper coding questions covering the Accenture NLT (National Level Test) coding section. These questions are representative of what you’ll encounter in Accenture’s online assessment and technical interviews.

What’s Included:

  • 20+ Coding Problems: Easy and Medium level problems with solutions
  • Multiple Language Solutions: Java, Python, and C++ solutions
  • Time Complexity Analysis: Every solution includes complexity analysis
  • Accenture-Specific Patterns: Focus on business logic and practical coding

Accenture Placement Papers 2024

Access 2024 Accenture NLT questions with solutions and exam pattern analysis.


View 2024 Papers →

Accenture Placement Papers 2025

Practice latest 2025 Accenture NLT questions with updated patterns.


View 2025 Papers →

Complete Accenture Guide

Access complete Accenture placement papers guide with eligibility, process, and preparation strategy.


View Complete Guide →

Accenture NLT Coding Section Breakdown:

SectionQuestionsTimeDifficultyFocus Areas
Coding Test230-35 minEasy-MediumArrays, strings, basic algorithms, business logic

Languages Allowed: C, C++, Java, Python

Passing Criteria: Solve at least 1 problem completely with all test cases passing

Find Maximum and Minimum in Array

Problem: Find the maximum and minimum elements in an array.

Example:

Input: [3, 5, 1, 8, 2]
Output: Max: 8, Min: 1

Solution (Java):

public int[] findMaxMin(int[] arr) {
if (arr == null || arr.length == 0) return new int[]{};
int max = arr[0], min = arr[0];
for (int num : arr) {
if (num > max) max = num;
if (num < min) min = num;
}
return new int[]{max, min};
}

Solution (Python):

def find_max_min(arr):
if not arr:
return None, None
return max(arr), min(arr)

Time Complexity: O(n) | Space Complexity: O(1)

Second Largest Element

Problem: Find the second largest element in an array without sorting.

Example:

Input: [12, 35, 1, 10, 34, 1]
Output: 34

Solution (Java):

public int secondLargest(int[] arr) {
if (arr.length < 2) return -1;
int first = Integer.MIN_VALUE, 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 == Integer.MIN_VALUE ? -1 : second;
}

Solution (Python):

def second_largest(arr):
if len(arr) < 2:
return -1
first = second = float('-inf')
for num in arr:
if num > first:
second = first
first = num
elif num > second and num != first:
second = num
return second if second != float('-inf') else -1

Time Complexity: O(n) | Space Complexity: O(1)

Rotate Array by K Positions

Problem: Rotate an array to the left by k positions.

Example:

Input: arr = [1, 2, 3, 4, 5], k = 2
Output: [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) or O(n)

Find Duplicate in Array

Problem: Find if there are any duplicates in an array.

Example:

Input: [1, 2, 3, 1]
Output: true (1 appears twice)

Solution (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)

Sum of Array Elements

Problem: Find the sum of all elements in an array.

Example:

Input: [1, 2, 3, 4, 5]
Output: 15

Solution (Java):

public int sumArray(int[] arr) {
int sum = 0;
for (int num : arr) {
sum += num;
}
return sum;
}

Solution (Python):

def sum_array(arr):
return sum(arr)

Time Complexity: O(n) | Space Complexity: O(1)

Find Missing Number (1 to N)

Problem: Find the missing number in an array containing 1 to n.

Example:

Input: [1, 2, 4, 5, 6] (n = 6)
Output: 3

Solution (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)

Master One Language

  • Choose Java, Python, or C++
  • 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

  • 15-17 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
Practice More Accenture Coding Questions →

Practice Accenture coding questions regularly! Focus on array manipulation, string processing, and mathematical problems. These are the most common problem types in Accenture NLT.

Pro Tip: Accenture values working code that handles all test cases. Focus on correctness first, then optimize if time permits.

Last updated: February 2026