---
title: Create a Coding Challenge (LeetLabs)
description: You can create a coding test that allows your learners to write, test, and debug code in a practical setting.
---

[Skip to content](https://support.learnyst.com/create-a-coding-test#main-content)

![Learnyst Logo-25-1.png\]](https://support.learnyst.com/hs-fs/hubfs/Learnyst%20Logo-25-1.png?height=40&name=Learnyst%20Logo-25-1.png)

- [Blogs](https://blog.learnyst.com/)
- [Product Demo](https://www.learnyst.com/product-demo)
- [Help Center](https://support.learnyst.com/?__hstc=63047858.c6632626f509e3bce8daa43b7e98f888.1712298652738.1721125968223.1721135407952.38&__hssc=63047858.1.1721135407952&__hsfp=1459259341&_gl=1*1hsz3xc*_gcl_aw*R0NMLjE3MzA4OTkxMzAuQ2p3S0NBaUF4S3k1QmhCYkVpd0FZaVctLTFMeml2UU9iS3JlNDdQaXE4Y2RDRTRPbE9iZnFVYS1sYkViTm5lcW52eHljMnNXOTRoMlRCb0N3QVVRQXZEX0J3RQ..*_gcl_au*MTM5MDI5MDc5LjE3MjU5Mzg3NTIuNjU1NTcwMzYxLjE3MzMyMzMxODAuMTczMzIzMzE3OQ..)
- [Success Stories](https://www.learnyst.com/customers/success-stories)

Open main navigation

Close main navigation

- [Blogs](https://blog.learnyst.com/)
- [Product Demo](https://www.learnyst.com/product-demo)
- [Help Center](https://support.learnyst.com/?__hstc=63047858.c6632626f509e3bce8daa43b7e98f888.1712298652738.1721125968223.1721135407952.38&__hssc=63047858.1.1721135407952&__hsfp=1459259341&_gl=1*1hsz3xc*_gcl_aw*R0NMLjE3MzA4OTkxMzAuQ2p3S0NBaUF4S3k1QmhCYkVpd0FZaVctLTFMeml2UU9iS3JlNDdQaXE4Y2RDRTRPbE9iZnFVYS1sYkViTm5lcW52eHljMnNXOTRoMlRCb0N3QVVRQXZEX0J3RQ..*_gcl_au*MTM5MDI5MDc5LjE3MjU5Mzg3NTIuNjU1NTcwMzYxLjE3MzMyMzMxODAuMTczMzIzMzE3OQ..)
- [Success Stories](https://www.learnyst.com/customers/success-stories)

 Hello, how can we help you today?

- There are no suggestions because the search field is empty.

1. [Support Center](https://support.learnyst.com/?hsLang=en)
2. [Courses](https://support.learnyst.com/courses?hsLang=en)
3. [Add Lesson](https://support.learnyst.com/courses?hsLang=en#add-lesson)

# Create a Coding Challenge (LeetLabs)

## Build auto-checked coding challenges in Javascript, Python, C, C++, Java or SQL for your learners.

<iframe data-hsv-src="https://play-na2.hubspotvideo.com/v/667314/id/338444379856" referrerpolicy="origin" sandbox="allow-forms allow-scripts allow-same-origin allow-popups" allow="autoplay; fullscreen;" style="position: absolute !important; width: 100% !important; height: 100% !important; left: 0; top: 0; border: 0 none; pointer-events: initial" title="HubSpot Video" loading="lazy" data-hsv-id="338444379856" data-hsv-style="" data-hsv-width="4178" data-hsv-height="1984" data-hsv-autoplay="false" data-hsv-loop="false" data-hsv-muted="false" data-hsv-hidden-controls="false" data-hsv-full-width="false"></iframe>

LeetLabs lets you create coding challenges inside Learnyst. Learners write code in a built-in editor, run it against your test cases, and submit it for automatic checking. It's made for coding instructors, programming tutors and mentors, computer science teachers and software development trainers who want hands-on practice, not just theory.

### What you can build with LeetLabs

- **Auto-checked coding exercises** inside your courses, so learners practise right after each lesson.
- **Problem sets and practice banks** for data structures and algorithms (DSA), grouped into a **Code Library**.
- **Placement and interview practice** with hidden test cases that check edge cases, like real coding rounds.
- **SQL practice** on your own tables and sample data.

LeetLabs is an add-on. If you see **Please subscribe to Leet Lab Addon to use this feature**, contact support@learnyst.com to enable it. Graded submissions use Learnyst credits. See [Add-ons are moving to Learnyst credits](https://support.learnyst.com/add-ons-are-moving-to-learnyst-credits?hsLang=en).

### Supported languages

Each challenge uses one language: **Javascript**, **C++**, **C**, **Java**, **Python** or **Sql**. Learners can only write code in the language you choose.

### Create a coding challenge

1. In your admin dashboard, go to **Products** \> **Code** and click **Create**.

![Code page with the Create button](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-25-7924-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-25-7924-PM.png)

1. Enter a **Title** (up to 60 characters) and an optional **Short Description** (up to 500 characters).
2. Choose the **Language**, then click **Create**.

![Create Code form with Title, Short Description and the Language list](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-37-0057-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-37-0057-PM.png)

You'll see **Successfully created!**. If the title or language is missing, you'll see **Title is a required field** or **Language is a required field**.

### Build the challenge in six steps

The challenge opens in **Build Code**, with six steps on the left. Steps marked with \* are required. Click **Save** on each step.

**1. Instructions**: the rules learners see before they start. A ready-made set is filled in for you: learners can submit only once, can run code once every minute, can see the solution only after they submit, and hints unlock after a set number of runs. Edit it if you want.

![Instructions step with the default editor instructions](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-38-3852-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-38-3852-PM.png)

**2. Problem Statement\***: describe the problem, the input format, the output format, an example and any constraints. Below it, add the **Initial Snippet**: the starter code learners see in the editor. For SQL challenges, this box is **Schema & Seed Data**, where you create the tables.

![Problem Statement step](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-39-4003-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-39-4003-PM.png)

**3. Test Cases\***: click **Add Test Case** and fill in:

- **Title** (up to 30 characters), **Input** and **Output** (up to 500 characters each). The input is given to the program as standard input, and the program's printed output must match the expected output exactly.
- **Test Case Visibility**: **Visible** (learner can view and execute the test case) or **Hidden** (test case executes only after submission, not visible to the learner).
- Optional **Pass Message**, **Fail Message** (up to 30 characters each) and **Description**.

![Add Test Cases panel with Title, Input and Output](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-40-4340-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-40-4340-PM.png)

![Test Case Visibility, Pass Message and Fail Message](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-41-5889-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-41-5889-PM.png)

Add at least one **Visible** test case so learners can check their code with **RUN**, and one or more **Hidden** test cases for edge cases, such as negative numbers or empty input. Hidden cases stop learners from just printing the expected answer.

**4. Hints**: click **Add Hints** and enter a **Title** (up to 30 characters) and the **Hint** (up to 500 characters). Add hints from gentle to more direct.

![Hints step with two hints](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-42-6148-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-42-6148-PM.png)

**5. Solution\***: add the model solution or an explanation. Learners can see it only after they submit.

![Solution step](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-27-4578-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-27-4578-PM.png)

**6. Advanced Options\***: choose the **Difficulty Level** (**Easy**, **Medium** or **Hard**) and set **Unlock Hints After** to the number of code runs after which hints become available to learners.

### Preview and test your challenge

1. Click **Preview** at the top. The challenge opens in a new tab, as learners see it.

![Preview button](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-29-4256-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-29-4256-PM.png)

1. Click **TAKE CHALLENGE**. The editor opens with the problem on the left, your starter code on the right, and the visible test cases below.

![Learner coding screen with the problem, editor and test cases](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-30-9065-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-30-9065-PM.png)

1. Write a solution and click **RUN**. Run checks the visible test cases. A wrong result shows **Wrong Answer** with the output next to the expected output.

![Wrong Answer result after Run](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-33-1155-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-33-1155-PM.png)

1. Fix the code and run again (you can run once every minute). A passing run shows **Correct Answer**.

![Correct Answer result after Run](https://support.learnyst.com/hs-fs/hubfs/image-png-Dec-02-2026-12-12-35-0218-PM.png?width=670&height=377&name=image-png-Dec-02-2026-12-12-35-0218-PM.png)

1. Click **SUBMIT**, then **SUBMIT** again in the **Submit Code** pop-up. The submission appears in the **Submissions** tab, and you can now view the **Solution** tab.

Test every challenge in Preview with your own solution before you publish it. Most failed challenges come from an expected output that doesn't exactly match what the program prints.

### Add the challenge to a course

To use the challenge in a course, [publish it](https://support.learnyst.com/publish-and-unpublish-the-code?hsLang=en) first: only published code can be added to products. Then, in your course, add a lesson of the type **Code Challenge**. See [Embed a coding challenge into courses](https://support.learnyst.com/embed-the-coding-challenge-into-courses?hsLang=en).

### Tips for writing good challenges

- **Say exactly what to print.** Show the exact output format in the problem, including spaces and line breaks.
- **Give a starter snippet.** Read the input for learners in the snippet, so beginners can focus on the logic.
- **Test edge cases with hidden test cases.** Zero, negative numbers, large values and empty input.
- **Use hints to teach, not to give away the answer.** Unlock them after a few runs.

### What to do next

- [Publish and unpublish code challenges](https://support.learnyst.com/publish-and-unpublish-the-code?hsLang=en): make the challenge available to add to products.
- [Embed a coding challenge into courses](https://support.learnyst.com/embed-the-coding-challenge-into-courses?hsLang=en): add it as a Code Challenge lesson.
- [Delete code challenges](https://support.learnyst.com/delete-the-code?hsLang=en): remove challenges you no longer need.
- [Add-ons and Learnyst credits](https://support.learnyst.com/add-ons-are-moving-to-learnyst-credits?hsLang=en): how LeetLabs usage is billed.

If you have questions, contact us at support@learnyst.com.

- [Get Started](https://support.learnyst.com/get-started#main-content)
- [AI Tools](https://support.learnyst.com/ai-tools#main-content)
- [Courses](https://support.learnyst.com/courses#main-content)

    - [Getting Started](https://support.learnyst.com/courses#getting-started)
    - [Build Course](https://support.learnyst.com/courses#build-course)
    - [Add Lesson](https://support.learnyst.com/courses#add-lesson)
    - [Course Settings](https://support.learnyst.com/courses#course-settings)
    - [Lesson Settings](https://support.learnyst.com/courses#lesson-settings)
    - [Course Certificate](https://support.learnyst.com/courses#course-certificate)
- [Mock test](https://support.learnyst.com/mock-test#main-content)

    - [Getting Started](https://support.learnyst.com/mock-test#getting-started)
    - [Build Mock Test](https://support.learnyst.com/mock-test#build-mock-test)
    - [GMAT Question Types](https://support.learnyst.com/mock-test#gmat-question-types)
    - [Mock test Settings](https://support.learnyst.com/mock-test#mock-test-settings)
    - [Mock Test Templates](https://support.learnyst.com/mock-test#mock-test-templates)
- [Test Series](https://support.learnyst.com/test-series#main-content)

    - [Getting Started](https://support.learnyst.com/test-series#getting-started)
    - [Build Test Series](https://support.learnyst.com/test-series#build-test-series)
    - [Settings](https://support.learnyst.com/test-series#settings)
    - [Test Series Templates](https://support.learnyst.com/test-series#test-series-templates)
- [Bundles](https://support.learnyst.com/bundles#main-content)

    - [Getting Started](https://support.learnyst.com/bundles#getting-started)
    - [Build Bundles](https://support.learnyst.com/bundles#build-bundles)
    - [Bundle Settings](https://support.learnyst.com/bundles#bundle-settings)
- [Batch](https://support.learnyst.com/batch#main-content)

    - [Batch Settings](https://support.learnyst.com/batch#batch-settings)
- [1:1 Coaching](https://support.learnyst.com/11-coaching#main-content)
- [Poll](https://support.learnyst.com/poll#main-content)
- [Track](https://support.learnyst.com/track#main-content)

    - [Getting Started](https://support.learnyst.com/track#getting-started)
    - [Track Settings](https://support.learnyst.com/track#track-settings)
- [Ebooks](https://support.learnyst.com/ebooks#main-content)
- [Podcasts](https://support.learnyst.com/podcasts#main-content)
- [Webinars](https://support.learnyst.com/webinars#main-content)
- [Digital/Custom Products](https://support.learnyst.com/digital-custom-products#main-content)
- [Free Resource](https://support.learnyst.com/free-resource#main-content)
- [Question Pool](https://support.learnyst.com/question-pool#main-content)

    - [Getting Started](https://support.learnyst.com/question-pool#getting-started)
    - [Build Question Pool](https://support.learnyst.com/question-pool#build-question-pool)
- [Quiz & Assessment](https://support.learnyst.com/quiz-assessment#main-content)

    - [Getting Started](https://support.learnyst.com/quiz-assessment#getting-started)
    - [Add Questions](https://support.learnyst.com/quiz-assessment#add-questions)
    - [Build Quiz](https://support.learnyst.com/quiz-assessment#build-quiz)
    - [Question Settings](https://support.learnyst.com/quiz-assessment#question-settings)
    - [Quiz Settings](https://support.learnyst.com/quiz-assessment#quiz-settings)
    - [Question Review Flow](https://support.learnyst.com/quiz-assessment#question-review-flow)
    - [Learner Results](https://support.learnyst.com/quiz-assessment#learner-results)
- [Classification](https://support.learnyst.com/classification#main-content)

    - [Categories](https://support.learnyst.com/classification#categories)
    - [Tags](https://support.learnyst.com/classification#tags)
- [Product Pricing](https://support.learnyst.com/product-pricing#main-content)

    - [Getting Started](https://support.learnyst.com/product-pricing#getting-started)
    - [Pricing Plans](https://support.learnyst.com/product-pricing#pricing-plans)
- [Website](https://support.learnyst.com/website#main-content)

    - [Getting Started](https://support.learnyst.com/website#getting-started)
    - [Building Website](https://support.learnyst.com/website#building-website)
    - [Website Navigation](https://support.learnyst.com/website#website-navigation)
    - [Superpower Widgets](https://support.learnyst.com/website#superpower-widgets)
    - [Sign Up Settings](https://support.learnyst.com/website#sign-up-settings)
    - [Widgets (Embeddables)](https://support.learnyst.com/website#widgets-embeddables)
- [Website Custom domain](https://support.learnyst.com/website-custom-domain#main-content)
- [Mobile Apps](https://support.learnyst.com/mobile-apps#main-content)

    - [Android](https://support.learnyst.com/mobile-apps#android)
    - [iOS](https://support.learnyst.com/mobile-apps#ios)
- [Communities](https://support.learnyst.com/communities#main-content)

    - [Learnyst Community](https://support.learnyst.com/communities#learnyst-community)
    - [Telegram Community](https://support.learnyst.com/communities#telegram-community)
- [Socials](https://support.learnyst.com/socials#main-content)
- [Gamification](https://support.learnyst.com/gamification#main-content)
- [Users](https://support.learnyst.com/users#main-content)

    - [Learners](https://support.learnyst.com/users#learners)
- [Learner Management](https://support.learnyst.com/learner-management#main-content)

    - [Learner Profile](https://support.learnyst.com/learner-management#learner-profile)
    - [Learner Actions](https://support.learnyst.com/learner-management#learner-actions)
    - [Learner Settings](https://support.learnyst.com/learner-management#learner-settings)
- [Zoho E-signin](https://support.learnyst.com/zoho-e-signin#main-content)
- [Roles and Permissions](https://support.learnyst.com/roles-and-permissions#main-content)
- [Marketing](https://support.learnyst.com/marketing#main-content)

    - [Refer Earn](https://support.learnyst.com/marketing#refer-earn)
    - [Push Message](https://support.learnyst.com/marketing#push-message)
    - [Marketing Email](https://support.learnyst.com/marketing#marketing-email)
    - [System Email](https://support.learnyst.com/marketing#system-email)
    - [Whatsapp Messenger](https://support.learnyst.com/marketing#whatsapp-messenger)
    - [Affiliates](https://support.learnyst.com/marketing#affiliates)
    - [Workflows](https://support.learnyst.com/marketing#workflows)
    - [Forms](https://support.learnyst.com/marketing#forms)
    - [Campaign](https://support.learnyst.com/marketing#campaign)
    - [CTA](https://support.learnyst.com/marketing#cta)
    - [Promo Slider](https://support.learnyst.com/marketing#promo-slider)
- [Workflows](https://support.learnyst.com/workflows#main-content)
- [Integrations](https://support.learnyst.com/integrations#main-content)

    - [Pabbly Integration](https://support.learnyst.com/integrations#pabbly-integration)
    - [Zapier Integration](https://support.learnyst.com/integrations#zapier-integration)
    - [Google Ads](https://support.learnyst.com/integrations#google-ads)
    - [Meta Ads](https://support.learnyst.com/integrations#meta-ads)
- [Newsfeed](https://support.learnyst.com/newsfeed#main-content)
- [Sales](https://support.learnyst.com/sales#main-content)
- [Ratings and Reviews](https://support.learnyst.com/ratings-and-reviews#main-content)
- [Learner Support](https://support.learnyst.com/learner-support#main-content)
- [Sub School](https://support.learnyst.com/sub-school#main-content)
- [Reports](https://support.learnyst.com/reports#main-content)

    - [Score Reports & Quiz Insights](https://support.learnyst.com/reports#score-reports-quiz-insights)
- [Content Security](https://support.learnyst.com/content-security#main-content)

    - [CourseGaurd](https://support.learnyst.com/content-security#coursegaurd)
- [School Settings](https://support.learnyst.com/school-settings#main-content)

    - [General Settings](https://support.learnyst.com/school-settings#general-settings)
    - [Learner Billing](https://support.learnyst.com/school-settings#learner-billing)
    - [Payment gateway](https://support.learnyst.com/school-settings#payment-gateway)
    - [Features](https://support.learnyst.com/school-settings#features)
    - [Security](https://support.learnyst.com/school-settings#security)
    - [Channels](https://support.learnyst.com/school-settings#channels)
- [Payments](https://support.learnyst.com/payments#main-content)

    - [Custom installments](https://support.learnyst.com/payments#custom-installments)
- [Subscriptions](https://support.learnyst.com/subscriptions#main-content)
- [Zoom integration](https://support.learnyst.com/zoom-integration#main-content)
- [Troubleshooting](https://support.learnyst.com/troubleshooting#main-content)

    - [Web – Windows](https://support.learnyst.com/troubleshooting#web-windows)
    - [Web – Mac](https://support.learnyst.com/troubleshooting#web-mac)
    - [Android app](https://support.learnyst.com/troubleshooting#android-app)
    - [General](https://support.learnyst.com/troubleshooting#general)
- [FAQs](https://support.learnyst.com/faqs#main-content)
- [Learners' Help article](https://support.learnyst.com/learners-help-article#main-content)
- [Add Ons](https://support.learnyst.com/add-ons#main-content)

- [Home](https://learnyst-1.hubspotpagebuilder.net/)
- [About Us](https://learnyst-1.hubspotpagebuilder.net/about-us)
- [Contact Us](https://learnyst-1.hubspotpagebuilder.net/contact-us)
- [Blog](https://learnyst.hs-sites-na2.com/blog)

[![Chill listening crop-3](https://support.learnyst.com/hs-fs/hubfs/Learnyst%20logo%20(2).png?width=24&height=24&name=Learnyst%20logo%20(2).png "Chill listening crop-3")](https://www.learnyst.com/)

Learnyst Support

Copyright © 2026, Learnyst Insights Pvt Ltd

```json
{
  "@context" : "https://schema.org",
  "@type" : "VideoObject",
  "contentUrl" : "https://667314.fs1.hubspotusercontent-na2.net/hubfs/667314/video_assets/338447692498/inherited/web_optimized.mp4",
  "dateModified" : "2026-04-27T09:35:00.543Z",
  "duration" : "PT1M51S",
  "height" : 1984,
  "name" : "Create a coding challenges (LeetLabs).",
  "thumbnailUrl" : "https://667314.fs1.hubspotusercontent-na2.net/hubfs/667314/Create%20a%20coding%20challenges%20(LeetLabs)..mp4/medium.jpg",
  "uploadDate" : "2026-04-27T09:34:39.284Z",
  "width" : 4178
}
```