Automated Coding Challenge

In this article you find instructions, guidelines, setup, details, submission and examples that will help you rock at our challenge.

Instructions and Guidelines

A proper setup and preparation make sure you make the most of your attempt.

Instructions Overview

  • Each challenge has 1 problem, and has a time limit of 45 minutes.
  • You can choose your preferred programming language. Some problems might have limited options.

  • Only 1 attempt allowed per 90 days. Ensure you have a stable internet connection for the duration of your attempt.
  • Each challenge has an untimed instructions section before you actually start.
  • Time only starts after instructions when you begin coding.
  • Please make sure you are not interrupted during the test, as the timer cannot be paused once started.

Guidelines and Setup

  • Workspace Prep: Arrange a well-lit space, minimize background noise, and maintain a neat appearance.
  • Browser: Use Firefox (not incognito) for optimal experience. Close all non-Turing browser tabs before starting.
  • Equipment: Have a working camera and microphone setup. This is a proctored test.
  • No Additional Monitor: Disconnect any additional screens before proceeding. If you’re.

Do not cheat

Can result in a temporary or permanent ban from the Turing platform. Refer to Turing’s Fair Assessment Policy for details.

You can attempt a practice challenge on the Automated Coding Challenges tab on the Turing portal. We recommend doing this because it’ll make you best prepared for the actual attempt.

Challenge Details

Components Of Solution 

  • #Plan: Write a plan/approach in multiline comments marked by "#Plan".

  • Code Comments: Provide clear, consistent inline comments to make the code readable for new code blocks, fixes or iterations.

  • Custom Test Cases: Add your custom test cases to validate your solution.

  • Test Validation: Use the "Run Test" button to validate your solution against custom, public, and hidden test cases. Aim for a score as close to 100% as possible.

You must include the above items as they’re used in generating the final score of your attempt.


  • Final Validation: Test your code one final time before submitting to avoid any compilation errors resulting in a score of 0.

  • Commit Message: Provide a descriptive commit message after submitting your solution. 

Coding Environment

Problem Statement and IDE

When you start the challenge, you'll see a problem statement on the left and an Integrated Development Environment (IDE) on the right, where you can write your solution. The timer begins as soon as you click 'Start Challenge' on the last slide of these instructions, once the environment has loaded successfully.


Updating your code

When starting a new code section or fixing a bug, add a comment explaining your thought process. Avoid skipping steps and provide more detail when in doubt.

When modifying existing code after test case validation, document the new approach in a comment above the edited code block. Explain the reasoning behind the changes and how the new approach aims to improve or fix the previous solution.

Test Validation

Use the "Run Tests" button in the coding environment to evaluate your solution against all public and hidden test cases. A progress bar will show your advancement toward passing all tests. 

Submit and Commit

Once you're ready to "Submit", you will be asked to confirm if you’re ready to lock in your solution. Before proceeding:

  • Thoroughly test your code one last time. Compile errors will be scored as 0
  • Once submitted, you cannot modify or resubmit your solution.
  • Your solution will be scored against all public and hidden test cases, along with the quality of your ‘#Plan’ and Code Comments.
  • Once you Proceed, the timer will stop, and you'll be asked to provide a brief commit message.

The timer will stop, and you will then be asked to provide a Commit Message. 



Given a list of emails and URLs, return a dictionary, where each key is a URL and the value is how many emails have the same domain.

Note that the domains begin with “www”, whereas the emails do not, and that emails with domains not in the list of urls should be ignored.


emails=['', '',', ''],

urls=['', '', '']


Regarding Handling Edge Cases, you can assume the precondition specified in function will be satisfied. For eg, in this 

problem, ALL website URLs will begin with a “www”, but you will still have to write the logic of ignoring emails that don’t have the domain in the “urls” list.


We want to see how you Plan your solution - clearly describing the thought process for solving the problem, what we also call “Explaining your approach”. You can iteratively update the initial plan as you work through the solution.

You can add multi-line comments using ””” operators in the IDE.

Code Comments

In addition to a good plan, it’s also great practice to include inline comments to make your code readable.

Some obvious bad examples are:

No Comments

Trivial Comments

A good example is:

Structured comments with important information included on the code, e.g. assumptions/etc.

Commit Message

Upon final submission, we will ask you for a final commit message. We want to see how you summarize and communicate the changes you implemented.