Dataset Viewer
The dataset viewer is not available for this dataset.
Cannot get the config names for the dataset.
Error code:   ConfigNamesError
Exception:    FileNotFoundError
Message:      Couldn't find any data file at /src/services/worker/oleksa12345/leetcode. Couldn't find 'oleksa12345/leetcode' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/oleksa12345/leetcode@b83d95e8af0d80e0210ad645cf36705043d64b80/data/train.jsonl' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.ndjson', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.conll', '.conllu', '.tar', '.xml', '.hdf5', '.h5', '.eval', '.lance', '.tsfile', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.3gp', '.3g2', '.avi', '.asf', '.flv', '.mp4', '.mov', '.m4v', '.mkv', '.webm', '.f4v', '.wmv', '.wma', '.ogm', '.mxf', '.nut', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.3GP', '.3G2', '.AVI', '.ASF', '.FLV', '.MP4', '.MOV', '.M4V', '.MKV', '.WEBM', '.F4V', '.WMV', '.WMA', '.OGM', '.MXF', '.NUT', '.glb', '.ply', '.stl', '.GLB', '.PLY', '.STL', '.pdf', '.PDF', '.nii', '.NII', '.zip', '.idx', '.manifest', '.txn']
Traceback:    Traceback (most recent call last):
                File "/src/services/worker/src/worker/job_runners/dataset/config_names.py", line 67, in compute_config_names_response
                  config_names = get_dataset_config_names(
                      path=dataset,
                      token=hf_token,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/inspect.py", line 161, in get_dataset_config_names
                  dataset_module = dataset_module_factory(
                      path,
                  ...<4 lines>...
                      **download_kwargs,
                  )
                File "/usr/local/lib/python3.14/site-packages/datasets/load.py", line 1211, in dataset_module_factory
                  raise FileNotFoundError(
                  ...<2 lines>...
                  ) from None
              FileNotFoundError: Couldn't find any data file at /src/services/worker/oleksa12345/leetcode. Couldn't find 'oleksa12345/leetcode' on the Hugging Face Hub either: FileNotFoundError: Unable to find 'hf://datasets/oleksa12345/leetcode@b83d95e8af0d80e0210ad645cf36705043d64b80/data/train.jsonl' with any supported extension ['.csv', '.tsv', '.json', '.jsonl', '.ndjson', '.parquet', '.geoparquet', '.gpq', '.arrow', '.txt', '.conll', '.conllu', '.tar', '.xml', '.hdf5', '.h5', '.eval', '.lance', '.tsfile', '.blp', '.bmp', '.dib', '.bufr', '.cur', '.pcx', '.dcx', '.dds', '.ps', '.eps', '.fit', '.fits', '.fli', '.flc', '.ftc', '.ftu', '.gbr', '.gif', '.grib', '.png', '.apng', '.jp2', '.j2k', '.jpc', '.jpf', '.jpx', '.j2c', '.icns', '.ico', '.im', '.iim', '.tif', '.tiff', '.jfif', '.jpe', '.jpg', '.jpeg', '.mpg', '.mpeg', '.msp', '.pcd', '.pxr', '.pbm', '.pgm', '.ppm', '.pnm', '.psd', '.bw', '.rgb', '.rgba', '.sgi', '.ras', '.tga', '.icb', '.vda', '.vst', '.webp', '.wmf', '.emf', '.xbm', '.xpm', '.BLP', '.BMP', '.DIB', '.BUFR', '.CUR', '.PCX', '.DCX', '.DDS', '.PS', '.EPS', '.FIT', '.FITS', '.FLI', '.FLC', '.FTC', '.FTU', '.GBR', '.GIF', '.GRIB', '.PNG', '.APNG', '.JP2', '.J2K', '.JPC', '.JPF', '.JPX', '.J2C', '.ICNS', '.ICO', '.IM', '.IIM', '.TIF', '.TIFF', '.JFIF', '.JPE', '.JPG', '.JPEG', '.MPG', '.MPEG', '.MSP', '.PCD', '.PXR', '.PBM', '.PGM', '.PPM', '.PNM', '.PSD', '.BW', '.RGB', '.RGBA', '.SGI', '.RAS', '.TGA', '.ICB', '.VDA', '.VST', '.WEBP', '.WMF', '.EMF', '.XBM', '.XPM', '.aiff', '.au', '.avr', '.caf', '.flac', '.htk', '.svx', '.mat4', '.mat5', '.mpc2k', '.ogg', '.paf', '.pvf', '.raw', '.rf64', '.sd2', '.sds', '.ircam', '.voc', '.w64', '.wav', '.nist', '.wavex', '.wve', '.xi', '.mp3', '.opus', '.3gp', '.3g2', '.avi', '.asf', '.flv', '.mp4', '.mov', '.m4v', '.mkv', '.webm', '.f4v', '.wmv', '.wma', '.ogm', '.mxf', '.nut', '.AIFF', '.AU', '.AVR', '.CAF', '.FLAC', '.HTK', '.SVX', '.MAT4', '.MAT5', '.MPC2K', '.OGG', '.PAF', '.PVF', '.RAW', '.RF64', '.SD2', '.SDS', '.IRCAM', '.VOC', '.W64', '.WAV', '.NIST', '.WAVEX', '.WVE', '.XI', '.MP3', '.OPUS', '.3GP', '.3G2', '.AVI', '.ASF', '.FLV', '.MP4', '.MOV', '.M4V', '.MKV', '.WEBM', '.F4V', '.WMV', '.WMA', '.OGM', '.MXF', '.NUT', '.glb', '.ply', '.stl', '.GLB', '.PLY', '.STL', '.pdf', '.PDF', '.nii', '.NII', '.zip', '.idx', '.manifest', '.txn']

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

LeetCode Problems Labelled by Solution Pattern (Sample)

A 100-problem sample of LeetCode problems annotated with the algorithmic technique that solves them, rather than the topic tag that describes what they are about.

LeetCode's own tags answer "what is this problem about" — Array, String, Hash Table. That is not the same question as "how is it solved". Both Two Sum and Longest Substring Without Repeating Characters are tagged Hash Table, but one is a complement lookup and the other is a sliding window with a seen-set. This dataset adds a solution_archetype field that answers the second question.

The full corpus this sample is drawn from covers 3,000 problems across 29 archetypes.

Dataset structure

One JSON object per line in data/train.jsonl:

field type description
problem_number int The problem's number on LeetCode
title string Problem title
slug string URL slug
difficulty string Easy, Medium or Hard
topic_tags list[string] LeetCode's own topic tags, unmodified
solution_archetype string The annotation. The technique that solves the problem
has_reference_solution bool Whether a worked reference solution exists for this problem
leetcode_url string Canonical problem URL on leetcode.com
pattern_reference string | null Write-up of the archetype, where one exists

Sample row

{
  "problem_number": 1,
  "title": "Two Sum",
  "slug": "two-sum",
  "difficulty": "Easy",
  "topic_tags": ["Array", "Hash Table"],
  "solution_archetype": "hash-map",
  "has_reference_solution": true,
  "leetcode_url": "https://leetcode.com/problems/two-sum/",
  "pattern_reference": "https://www.stealthinterview.ai/leetcode/patterns/hash-map"
}

Composition of this sample

100 problems, stratified to cover as many archetypes as possible while keeping the difficulty mix of the source corpus: 21 Easy / 63 Medium / 16 Hard, spanning 29 distinct archetypes. Selection is deterministic — problems are taken in ascending number, round-robin across archetypes — so the sample is reproducible rather than a random draw. Premium-only problems are excluded, because their statements are not publicly checkable.

Usage

from datasets import load_dataset

ds = load_dataset("<your-username>/leetcode-solution-patterns-sample", split="train")

# Problems solved by a monotonic stack
mono = ds.filter(lambda r: r["solution_archetype"] == "monotonic-stack")

# Where LeetCode's tag and the solving technique disagree
mismatch = ds.filter(
    lambda r: "Hash Table" in r["topic_tags"] and r["solution_archetype"] != "hash-map"
)

Provenance and what is actually original here

This distinction matters, so it is stated plainly:

  • Not original, and not owned by this dataset: problem numbers, titles, slugs, difficulty ratings and topic tags. These are factual references to problems hosted on LeetCode.
  • Original: the solution_archetype labels and the taxonomy of 29 archetypes they are drawn from. These were derived by analysing solution structure across the corpus and are the reason this dataset exists.

No problem statements, test cases, editorial content or LeetCode solutions are included in this dataset. Only metadata and links back to the canonical problem pages. If you need the problem text, follow leetcode_url.

LeetCode is a trademark of its respective owner. This dataset is not affiliated with, endorsed by, or sponsored by LeetCode.

Licence

The annotationssolution_archetype and the taxonomy — are released under CC BY 4.0. Attribution is appreciated if you use the labels in research or a downstream dataset.

The referenced problem metadata is factual information about a third-party platform and is not claimed under this licence.

Limitations

  • One archetype per problem. Many problems admit more than one valid approach; the label records the technique the reference solution used, not the only one that works.
  • bespoke is a real category, not a fallback for hard problems. It marks problems whose solution does not generalise to a reusable pattern.
  • The taxonomy is opinionated. Where you draw the line between stack and monotonic-stack, or dfs and graph-traversal, is a judgement call. The boundaries here are consistent within the corpus but are not a standard anyone else has ratified.
  • Sample, not corpus. 100 of 3,000. Frequencies here will not match the full distribution.

Source

Built from the problem library at stealthinterview.ai/leetcode, which organises the full 3,000-problem set by solving technique. The archetype taxonomy and the per-technique write-ups — including the template, complexity and applicable problems for each — are documented at stealthinterview.ai/leetcode/patterns.

Citation

@misc{leetcode_solution_patterns_2026,
  title  = {LeetCode Problems Labelled by Solution Pattern},
  year   = {2026},
  url    = {https://www.stealthinterview.ai/leetcode/patterns},
  note   = {Sample of 100 problems annotated with solving technique}
}
Downloads last month
34