Placement Prep

AMCAT Automata Test: Questions, Answers, and Scoring Criteria

Two coding questions, a ticking clock, and an automated grader that scores correctness and complexity. Complete AMCAT Automata prep guide with solved examples.

By FACE Prep Team 8 min read
amcat automata coding-test placement-prep data-structures programming

The AMCAT Automata test gives you two coding questions and roughly 30 minutes to solve them. What gets you through is not speed alone: the automated grader scores your submission on correctness, time complexity, runtime error handling, and whether your approach matches industry-standard patterns.

This article covers what the test is, which question types appear at each difficulty level, what the grader is actually measuring, and how to structure your preparation across four weeks.


What the AMCAT Automata Test Is and Who Runs It

The Automata test is the programming assessment within the AMCAT (Aspiring Minds Computer Adaptive Test) platform, administered by SHL India. SHL acquired Aspiring Minds in 2019 and continues to run the test under both names. Recruiter emails often say “AMCAT” while the test portal still carries Aspiring Minds branding; both refer to the same assessment.

The test runs on SHL’s Automata 2.0 platform, which supports C, C++, Java, and Python. You write code in a browser-based IDE with no local setup required. Your language choice is made at the start of the section and cannot be changed mid-test.

ParameterValue
Number of questions2 (1 easy + 1 hard)
Time limit~30 minutes (employer-configured)
Languages supportedC, C++, Java, Python
GradingAutomated, multi-axis
VariantsAutomata (write from scratch) vs. Automata Fix (debug given code)

Automata vs. Automata Fix: Standard Automata asks you to write code from scratch. Automata Fix presents broken code and asks you to find and correct the errors. These are different tests measuring different skills. Most fresh-hire pipelines use standard Automata; Automata Fix appears more often in lateral or senior-track assessments.

The Automata section is one part of a broader AMCAT test that also includes English, logical reasoning, and quantitative ability. For a complete breakdown of every AMCAT module and what each covers, see the AMCAT syllabus module-wise guide.


Easy-Level Question Types

Easy-level Automata questions test basic programming fluency. Most require loops, conditionals, string operations, or recursion applied to a single data structure. A student comfortable with the five patterns below should handle the easy question confidently.

1. Find the Largest of N Numbers

Problem: Given three integers, print the largest.

Input: a = 5, b = 10, c = 3 → Output: 10

Concept used: Conditional statements (if-else). This is the entry-level pattern; if you’re writing Python, a single max() call is acceptable.

2. Sum of Digits

Problem: Given an integer, find the sum of its digits.

Input: n = 1234 → Output: 10 (1+2+3+4)

Concept used: Loop with modulus operator (%) and integer division. Extract the last digit with n % 10, add it to a running total, then reduce n with integer division by 10 until n == 0.

3. Reverse a String

Problem: Given a string, print its reverse.

Input: "hello" → Output: "olleh"

Concept used: String indexing or two-pointer technique.

def reverse_string(s):
    return s[::-1]

print(reverse_string("hello"))  # olleh

4. Factorial Calculation

Problem: Calculate the factorial of n.

Input: n = 5 → Output: 120

Concept used: Recursion or iterative loop.

def factorial(n):
    if n <= 1:
        return 1
    return n * factorial(n - 1)

print(factorial(5))  # 120

Guard the base case. An unguarded recursive call with large n will hit Python’s recursion limit and lose runtime-error points.

5. Print Distinct Elements of Two Arrays (Worked Example)

This is a frequent easy-to-medium variant that tests whether you can compare two collections efficiently.

Problem: Given two arrays, print all elements that appear in only one of the two arrays, and print the total count of such elements.

Input: arr1 = {1, 2, 3, 4, 5}, arr2 = {2, 6, 8, 10}

#include <stdio.h>

int print_distinct(int *arr1, int *arr2, int l1, int l2) {
    int count = 0, flag, i, j;
    for (i = 0; i < l1; i++) {
        flag = 0;
        for (j = 0; j < l2; j++) {
            if (arr1[i] == arr2[j]) { flag = 1; break; }
        }
        if (!flag) { printf("%d ", arr1[i]); count++; }
    }
    for (i = 0; i < l2; i++) {
        flag = 0;
        for (j = 0; j < l1; j++) {
            if (arr2[i] == arr1[j]) { flag = 1; break; }
        }
        if (!flag) { printf("%d ", arr2[i]); count++; }
    }
    return count;
}

int main() {
    int arr1[] = {1, 2, 3, 4, 5};
    int arr2[] = {2, 6, 8, 10};
    int result = print_distinct(arr1, arr2, 5, 4);
    printf("\nTotal distinct elements: %d\n", result);
    return 0;
}

Output: 1 3 4 5 6 8 10 / Total distinct elements: 7

This is an O(n*m) solution. In a test setting with small arrays, it earns full correctness points. If the grader runs it on large arrays, a hash-set approach would be faster, but for the input sizes typical in easy-level Automata questions, the nested loop is accepted.


Hard-Level Question Types

Hard-level questions require knowing a specific algorithm or data-structure pattern by name. If you haven’t seen the technique, the question is genuinely hard. If you have, it reduces to an implementation exercise under time pressure. These five patterns appear most often.

1. Find the Missing Number in an Array

Problem: An array contains n-1 numbers from 1 to n, with one number missing. Find it.

Input: [1, 2, 4, 5, 6] → Output: 3

Approach: Sum formula. Expected sum of 1 to n is n*(n+1)/2. Subtract the actual array sum. O(n) time, O(1) space.

def missing_number(arr, n):
    return n * (n + 1) // 2 - sum(arr)

print(missing_number([1, 2, 4, 5, 6], 6))  # 3

Alternative: XOR of all numbers from 1 to n, XOR-ed with every array element. Avoids overflow risk for very large n.

2. Longest Substring Without Repeating Characters

Problem: Find the length of the longest substring with no repeated character.

Input: "abcabcbb" → Output: 3 (“abc”)

Approach: Sliding window with a set. Expand the right pointer; when a duplicate is found, contract the left pointer until the duplicate is removed. O(n) time. This is a frequently-tested pattern in both AMCAT Automata and other screening tests.

3. Majority Element (Boyer-Moore Voting)

Problem: Find the element that appears more than n/2 times in an array of size n.

Input: [3, 3, 4, 2, 3, 3, 3, 1] → Output: 3

Approach: Boyer-Moore Voting Algorithm. Maintain a candidate and a count. If the current element matches the candidate, increment count. If not, decrement. When count hits 0, the current element becomes the new candidate. O(n) time, O(1) space.

4. Merge Two Sorted Arrays Without Extra Space

Problem: Merge two sorted arrays in sorted order without allocating additional memory.

Input: arr1 = [1, 4, 7, 8], arr2 = [2, 3, 5, 6]

Expected result: both arrays together contain [1, 2, 3, 4, 5, 6, 7, 8] distributed correctly.

Approach: Gap method (Shell sort variant). Start with a gap of ceil((len1+len2)/2). Compare elements that are gap positions apart across both arrays; swap if out of order. Halve the gap after each pass. O(n log n) time, O(1) space. Two-pointer working backward is an alternative but modifies the arrays in a different order.

5. Kth Smallest Element

Problem: Find the k-th smallest element in an unsorted array.

Input: arr = [7, 10, 4, 3, 20, 15], k = 3 → Output: 7

Approach: Min-heap of all elements, then pop k times. O(n + k log n) time. QuickSelect is faster on average at O(n) but can degrade to O(n^2) in the worst case. For AMCAT Automata’s typical input sizes, the heap approach is safer.

Pattern to note across all five: Hard Automata questions almost always have an O(n) or O(n log n) optimal solution that the grader rewards on the complexity axis. Brute-force nested loops often earn correctness points but lose complexity points.


What the Automata Grader Actually Scores

Most students prepare only for correctness. The grader scores four dimensions.

According to SHL India’s published assessment framework, the grader evaluates:

1. Correctness: Your code is run against three tiers of test cases. Basic cases are simple, expected inputs. Advanced cases include edge cases and moderately complex inputs. Boundary cases test extreme or unusual inputs (empty arrays, very large numbers, strings with special characters). A solution that handles basic cases but crashes on boundary inputs loses correctness points on those tiers.

2. Time complexity: The grader measures actual runtime across the test cases and compares it against expected complexity for the problem type. An O(n^2) solution that times out on large inputs will score lower than an O(n) solution, even if both produce correct output on small inputs.

3. Runtime error handling: Null pointer dereferences, array-out-of-bounds accesses, stack overflows from unguarded recursion, and unhandled exceptions all count against your runtime-error score. Write code that handles unexpected inputs gracefully, not just the happy path.

4. Industry-standard approach: The grader rewards solutions that use recognised algorithmic patterns. Solving a substring problem with a brute-force double loop when the sliding window is the expected pattern scores lower on this axis even if the output is correct.

Practical implication for scores: A student who writes correct but O(n^2) code for every question will typically score in the 50th to 60th percentile range. Getting above 70th percentile generally requires the hard question to use an optimal-complexity approach.

For full exam details including scheduling and registration, see the AMCAT exam dates, fees, and pattern guide.


Four-Week Prep Plan for AMCAT Automata

This plan assumes you have basic programming fluency in at least one supported language. If you’re still learning to write loops and functions, add two weeks of fundamentals before starting Week 1.

Week 1: Arrays and Strings

Focus areas: array traversal, two-pointer technique, string manipulation, prefix sums.

Daily target: 2 problems, one easy and one medium. Use LeetCode, HackerRank, or CodeChef; all are free for most relevant problems.

Key problems to solve: reverse array, find duplicates in unsorted array, anagram check, maximum subarray sum (Kadane’s algorithm).

Week 2: Recursion and Sorting

Focus areas: recursive thinking, factorial, Fibonacci, merge sort, quicksort, binary search.

Daily target: 2 problems.

Key exercise: write at least 5 recursive functions from scratch. Every recursive function should have a clearly written base case. One common runtime error in Automata is hitting Python’s default recursion depth limit on recursive solutions with large inputs; add a depth guard or switch to an iterative approach when n is large.

Week 3: Linked Lists, Stacks, and Basic Trees

Focus areas: singly linked list operations, stack-based problems (balanced bracket checker), queue implementation, binary tree traversal.

Daily target: 2 to 3 problems.

These topics appear less often in Automata than in TCS CodeVita or HackerEarth assessments but do show up in hard-level questions when the employer has configured a more advanced test.

Week 4: Timed Mocks and Weak-Area Drill

Take one full timed mock every 2 days. SHL India provides sample tests on the AMCAT official portal. After each mock, list every question you couldn’t solve within 15 minutes. Those are your weak areas. Drill 2 similar problems the following day.

Also review question patterns and common problem types at the AMCAT previous papers and most-repeated questions guide.

Language selection: Python is the fastest to write for most students and has readable syntax that reduces transcription errors under pressure. C is better when the problem explicitly involves pointers or memory management (such as the vowel-removal pointer exercise in the original test). Java is fine but verbose. Pick the language you write correctly under pressure, not the one you think is more impressive.


Coding Skills, AI, and What Comes Next

The skills the Automata test measures, algorithmic thinking, data manipulation, and optimising for time and space, are the same foundation that AI engineering builds on. Writing a sliding window to find the longest non-repeating substring uses the same problem-solving class as writing an efficient text pre-processing step for an LLM pipeline. Recursion with memoisation is a short conceptual step from understanding how transformer attention caches intermediate computations.

This is not a suggestion to abandon placement prep. It’s context: if you’re solving medium-difficulty Automata questions with correct complexity, you already have the programming foundation to explore what AI tools look like in practice.

The 2026 AI roadmap for Indian engineering students maps out where those skills take you next, with a curriculum starting from exactly the level Automata prep builds to.

For students who want to experiment with LLM APIs without a full curriculum commitment, TinkerLLM is FACE Prep’s self-paced playground starting at ₹299.

Clear the Automata test first. The rest follows from here.

Primary sources

Frequently asked questions

How many questions are in the AMCAT Automata test?

The Automata section typically has 2 coding questions: one easy-level and one hard-level, to be solved within approximately 30 minutes.

Which programming languages does AMCAT Automata 2.0 support?

The Automata 2.0 platform supports C, C++, Java, and Python. Pick the language you write most comfortably in; all four are fully supported.

What is the time limit for the AMCAT Automata section?

The Automata section is generally allocated around 30 minutes for 2 questions. The exact time may vary slightly depending on the employer's test configuration.

What is the difference between Automata and Automata Fix?

Automata requires you to write code from scratch given a problem statement. Automata Fix gives you buggy code and asks you to identify and correct the errors, which is a different skill set entirely.

How is AMCAT Automata code graded?

The automated grader scores your code on 4 axes: correctness across basic, advanced, and boundary test cases; time complexity; runtime error handling; and whether the approach aligns with industry-standard patterns.

Can I use standard library functions in AMCAT Automata?

Yes. Standard library functions such as sort(), string functions, and math utilities are allowed. The grader evaluates your overall approach and correctness, not whether you wrote every helper function manually.

What topics should I prioritise to prepare for AMCAT Automata?

Arrays, strings, recursion, and basic sorting algorithms cover most easy-level questions. For hard-level questions, add sliding window, two-pointer techniques, and basic heap usage to your preparation.

Build AI projects

A self-paced playground for building with LLMs.

TinkerLLM is FACE Prep's sister property. A guided environment for shipping real LLM applications, the kind of project that earns a paragraph on your resume, not a line.

Try TinkerLLM (₹299 launch)
Free AI Roadmap PDF