slug stringlengths 4 75 | solution_id stringlengths 20 91 | primary_algorithm stringclasses 22
values | verified null | messages listlengths 3 3 |
|---|---|---|---|---|
partial-function-with-placeholders | partial-function-with-placeholders__01__javascript | Brute Force | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven a function fn and an array args, return a function partialFn. ... |
construct-product-matrix | construct-product-matrix__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven a 0-indexed 2D integer matrix grid of size n * m, we define a ... |
find-champion-ii | find-champion-ii__01__javascript | Graph | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nThere are n teams numbered from 0 to n - 1 in a tournament; each tea... |
find-champion-ii | find-champion-ii__02__javascript | Graph | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nThere are n teams numbered from 0 to n - 1 in a tournament; each tea... |
minimum-cost-to-convert-string-i | minimum-cost-to-convert-string-i__01__javascript | Graph | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given two 0-indexed strings source and target, both of lengt... |
count-elements-with-maximum-frequency | count-elements-with-maximum-frequency__01__javascript | Hash Table | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an array nums consisting of positive integers.\n\nRetu... |
minimum-number-of-pushes-to-type-word-ii | minimum-number-of-pushes-to-type-word-ii__01__javascript | Greedy | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given a string word containing lowercase English letters.\n\... |
alice-and-bob-playing-flower-game | alice-and-bob-playing-flower-game__01__javascript | Math | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nAlice and Bob are playing a turn-based game on a field, with two lan... |
alice-and-bob-playing-flower-game | alice-and-bob-playing-flower-game__02__javascript | Math | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nAlice and Bob are playing a turn-based game on a field, with two lan... |
find-the-length-of-the-longest-common-prefix | find-the-length-of-the-longest-common-prefix__01__javascript | Hash Table | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given two arrays with positive integers arr1 and arr2.\n\nA ... |
longest-strictly-increasing-or-strictly-decreasing-subarray | longest-strictly-increasing-or-strictly-decreasing-subarray__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an array of integers nums. Return the length of the lo... |
string-compression-iii | string-compression-iii__01__javascript | Two Pointers | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven a string word, compress it using the following algorithm:\n\n\... |
string-compression-iii | string-compression-iii__02__javascript | Two Pointers | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven a string word, compress it using the following algorithm:\n\n\... |
string-compression-iii | string-compression-iii__03__javascript | String | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven a string word, compress it using the following algorithm:\n\n\... |
peaks-in-array | peaks-in-array__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nA peak in an array arr is an element that is greater than its previo... |
find-the-minimum-area-to-cover-all-ones-i | find-the-minimum-area-to-cover-all-ones-i__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given a 2D binary array grid. Find a rectangle with horizont... |
find-the-minimum-area-to-cover-all-ones-ii | find-the-minimum-area-to-cover-all-ones-ii__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given a 2D binary array grid. You need to find 3 non-overlap... |
find-the-power-of-k-size-subarrays-i | find-the-power-of-k-size-subarrays-i__02__javascript | Sliding Window | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an array of integers nums of length n and a positive i... |
find-the-count-of-good-integers | find-the-count-of-good-integers__01__javascript | Math | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given two positive integers n and k.\n\nAn integer x is call... |
minimum-number-of-seconds-to-make-mountain-height-zero | minimum-number-of-seconds-to-make-mountain-height-zero__01__javascript | Binary Search | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an integer mountainHeight denoting the height of a mou... |
find-the-last-marked-nodes-in-tree | find-the-last-marked-nodes-in-tree__01__javascript | DFS | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nThere exists an undirected tree with n nodes numbered 0 to n - 1. Yo... |
check-balanced-string | check-balanced-string__01__javascript | Math | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given a string num consisting of only digits. A string of di... |
adjacent-increasing-subarrays-detection-i | adjacent-increasing-subarrays-detection-i__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven an array nums of n integers and an integer k, determine whethe... |
adjacent-increasing-subarrays-detection-ii | adjacent-increasing-subarrays-detection-ii__01__javascript | Binary Search | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven an array nums of n integers, your task is to find the maximum ... |
minimum-total-operations | minimum-total-operations__01__javascript | Array | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nGiven an array of integers nums, you can perform any number of opera... |
minimum-operations-to-make-array-values-equal-to-k | minimum-operations-to-make-array-values-equal-to-k__01__javascript | Hash Table | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an integer array nums and an integer k.\n\nAn integer ... |
check-if-grid-can-be-cut-into-sections | check-if-grid-can-be-cut-into-sections__01__javascript | Sorting | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an integer n representing the dimensions of an n x n g... |
maximum-and-minimum-sums-of-at-most-size-k-subarrays | maximum-and-minimum-sums-of-at-most-size-k-subarrays__01__javascript | Math | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an integer array nums and a positive integer k. Return... |
sort-matrix-by-diagonals | sort-matrix-by-diagonals__01__javascript | Sorting | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given an n x n square matrix of integers grid. Return the ma... |
longest-common-prefix-after-at-most-one-removal | longest-common-prefix-after-at-most-one-removal__01__javascript | Two Pointers | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given two strings s and t.\n\nReturn the length of the longe... |
find-closest-person | find-closest-person__01__javascript | Math | null | [
{
"role": "system",
"content": "You are a competitive programming assistant. Given a problem, its examples, and a required algorithm/technique, write a correct JavaScript solution."
},
{
"role": "user",
"content": "### Problem\nYou are given three integers x, y, and z, representing the positions... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.