The Coding Assessment gives you 2 problems in 45 minutes, to be solved in C, C++, Java, Python or .NET. Problems are implementation-style rather than algorithmic — cumulative sums, range math, string validation — but the grader runs hidden test cases, and the special cases spelled out in the problem statement (return −1 for null, 0 for insufficient) are exactly what the hidden cases check.
What Accenture coding questions test
- Array traversal with running totals and thresholds
- String parsing, validation and character rules
- Math on ranges — divisibility, sums, exponents of factors
- Careful handling of the stated edge cases (null, empty, not found)
- Reading input / returning output exactly as specified
Practice real Accenture coding problems
These problems appeared in memory-based Accenture papers. Try each one yourself before revealing the approach — solutions are provided in Python, Java and C++.
The function accepts two positive integers r and unit and a positive integer array arr of size n. r is the number of rats in an area, unit is the amount of food each rat consumes, and the i-th element of arr is the amount of food in house number i+1. Return the minimum number of houses (taken in order) required to satisfy the food requirement of all the rats. Return -1 if the array is null, and 0 if the total food from all houses is not sufficient for all the rats.
Input: r = 7, unit = 2, n = 8, arr = [2, 8, 3, 5, 7, 4, 1, 2]
Output: 4
Total food required = 7 × 2 = 14. The first 4 houses hold 2 + 8 + 3 + 5 = 18 ≥ 14, so 4 houses are enough.
- r > 0, unit > 0
- arr[i] > 0
You are given a string str consisting of binary digits separated by letters: A denotes the AND operation, B denotes the OR operation and C denotes the XOR operation. Evaluate the string from left to right, taking one operation at a time, and return the final result. Return -1 if the string is null.
Input: str = "1C0C1C1A0B1"
Output: 1
The expression is 1 XOR 0 XOR 1 XOR 1 AND 0 OR 1, evaluated strictly left to right: 1, 0, 1, 0, 1.
- str contains only the characters 0, 1, A, B and C
- No operator precedence — evaluate left to right
Implement the function differenceOfSum(n, m). The function accepts two positive integers n and m. Find the sum of all numbers in the range 1 to m (both inclusive) that are NOT divisible by n, and the sum of all numbers in the same range that ARE divisible by n. Return the difference (sum of non-divisible − sum of divisible).
Input: n = 4, m = 20
Output: 90
Sum divisible by 4: 4+8+12+16+20 = 60. Sum not divisible: 210 − 60 = 150. Difference = 150 − 60 = 90.
- n > 0, m > 0
Implement the function checkPassword(str). Return 1 if the given string is a valid password, otherwise return 0. A password is valid if it has at least 4 characters, contains at least one numeric digit, contains at least one capital letter, does not contain any space or slash (/), and its first character is not a digit.
Input: str = "aA1_67"
Output: 1
6 characters, has digits (1, 6, 7), has a capital letter (A), no space or slash, and starts with a letter.
Input: str = "1Abc7"
Output: 0
The first character is a digit, so the password is invalid.
- The input string is not empty
Your coding score is the main lever for the Advanced ASE package — finish problem 1 completely (all special cases handled) before opening problem 2. One accepted solution beats two half solutions.


