question_id
int64 1
3.58k
| name
stringlengths 3
77
| content
stringlengths 516
21.8k
| acRate
float64 9.94
93
| difficulty
stringclasses 3
values | topics
sequencelengths 0
10
| runtimeDistribution
stringlengths 53
2.38k
| memoryDistribution
stringlengths 54
2.14k
| rt_list
listlengths 1
156
| rt_solution_count
int64 1
156
| mm_list
listlengths 1
154
| mm_solution_count
int64 1
154
|
---|---|---|---|---|---|---|---|---|---|---|---|
131 | palindrome-partitioning | "<p>Given a string <code>s</code>, partition <code>s</code> such that every <span data-keyword=\"sub(...TRUNCATED) | 70.275043 | Medium | [
"string",
"dynamic-programming",
"backtracking"
] | "{\"lang\": \"python3\", \"distribution\": [[\"102\", 0.0178], [\"108\", 0.0089], [\"114\", 0.0089],(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"22901\", 0.0534], [\"23105\", 0.0089], [\"23309\", 0.(...TRUNCATED) | [{"code":"# class Solution:\ndef partition( s: str) -> List[List[str]]:\n \n def find_palind(s(...TRUNCATED) | 121 | [{"code":"from collections.abc import Generator\nfrom functools import lru_cache\n\nclass Solution:\(...TRUNCATED) | 112 |
132 | palindrome-partitioning-ii | "<p>Given a string <code>s</code>, partition <code>s</code> such that every <span data-keyword=\"sub(...TRUNCATED) | 34.332739 | Hard | [
"string",
"dynamic-programming"
] | "{\"lang\": \"python3\", \"distribution\": [[\"71\", 0.2292], [\"128\", 0.0764], [\"185\", 0.0764], (...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"19711\", 34.30139999999998], [\"26535\", 0.9168000000(...TRUNCATED) | [{"code":"class Solution:\n def minCut(self, s: str) -> int:\n if s == s[::-1]:\n (...TRUNCATED) | 139 | [{"code":"class Solution:\n def minCut(self, s: str) -> int:\n N = len(s)\n dp = [i(...TRUNCATED) | 84 |
133 | clone-graph | "<p>Given a reference of a node in a <strong><a href=\"https://en.wikipedia.org/wiki/Connectivity_(g(...TRUNCATED) | 59.051185 | Medium | [
"hash-table",
"depth-first-search",
"breadth-first-search",
"graph"
] | "{\"lang\": \"python3\", \"distribution\": [[\"19\", 0.0228], [\"20\", 0.0228], [\"21\", 0.0137], [\(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"16200\", 0.0046], [\"16500\", 0.0091], [\"16600\", 0.(...TRUNCATED) | [{"code":"class Solution:\n def cloneGraph(self, node: \"Node\") -> \"Node\":\n oldToNew =(...TRUNCATED) | 53 | [{"code":"\"\"\"\n# Definition for a Node.\nclass Node:\n def __init__(self, val = 0, neighbors =(...TRUNCATED) | 11 |
134 | gas-station | "<p>There are <code>n</code> gas stations along a circular route, where the amount of gas at the <co(...TRUNCATED) | 45.608174 | Medium | [
"array",
"greedy"
] | "{\"lang\": \"python3\", \"distribution\": [[\"90\", 0.066], [\"102\", 0.059300000000000005], [\"113(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"19200\", 0.0066], [\"19900\", 0.0066], [\"20000\", 0.(...TRUNCATED) | [{"code":"def canCompleteCircuit(gas: List[int], cost: List[int]) -> int:\n if sum(gas) < sum(cos(...TRUNCATED) | 135 | [{"code":"class Solution:\n def canCompleteCircuit(self, gas: List[int], cost: List[int]) -> int:(...TRUNCATED) | 52 |
135 | candy | "<p>There are <code>n</code> children standing in a line. Each child is assigned a rating value give(...TRUNCATED) | 43.844561 | Hard | [
"array",
"greedy"
] | "{\"lang\": \"python3\", \"distribution\": [[\"42\", 0.0197], [\"44\", 0.0098], [\"50\", 0.0098], [\(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"17700\", 0.0098], [\"17900\", 0.0197], [\"18000\", 0.(...TRUNCATED) | [{"code":"class Solution:\n\n def candy(self, ratings: List[int]) -> int:\n up = 0\n (...TRUNCATED) | 109 | [{"code":"class Solution:\n def candy(self, ratings: List[int]) -> int:\n n = len(ratings)(...TRUNCATED) | 46 |
136 | single-number | "<p>Given a <strong>non-empty</strong> array of integers <code>nums</code>, every element appea(...TRUNCATED) | 74.091617 | Easy | [
"array",
"bit-manipulation"
] | "{\"lang\": \"python3\", \"distribution\": [[\"53\", 0.16499999999999995], [\"104\", 84.900500000000(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"17700\", 0.0033], [\"17900\", 0.0132], [\"18000\", 0.(...TRUNCATED) | [{"code":"with open('user.out', 'a') as f:\n for n in map(loads, stdin):\n f.write(str(red(...TRUNCATED) | 154 | [{"code":"class Solution:\n def singleNumber(self, nums: List[int]) -> int:\n \n fo(...TRUNCATED) | 27 |
137 | single-number-ii | "<p>Given an integer array <code>nums</code> where every element appears <strong>three times</s(...TRUNCATED) | 63.768279 | Medium | [
"array",
"bit-manipulation"
] | "{\"lang\": \"python3\", \"distribution\": [[\"31\", 0.20650000000000002], [\"41\", 4.25970000000000(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"17400\", 0.0188], [\"17700\", 0.0188], [\"17900\", 0.(...TRUNCATED) | [{"code":"class Solution:\n def singleNumber(self, nums: List[int]) -> int:\n cnt = defaul(...TRUNCATED) | 124 | [{"code":"f = open('user.out', \"w\")\ninp = map(loads, stdin)\nfor i in inp:\n ones = 0\n two(...TRUNCATED) | 20 |
138 | copy-list-with-random-pointer | "<p>A linked list of length <code>n</code> is given such that each node contains an additional rando(...TRUNCATED) | 57.619023 | Medium | [
"hash-table",
"linked-list"
] | "{\"lang\": \"python3\", \"distribution\": [[\"12\", 0.0059], [\"17\", 0.0059], [\"18\", 0.0236], [\(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"16500\", 0.0059], [\"16600\", 0.0118], [\"17000\", 0.(...TRUNCATED) | [{"code":"\"\"\"\n# Definition for a Node.\nclass Node:\n def __init__(self, x: int, next: 'Node'(...TRUNCATED) | 51 | [{"code":"\"\"\"\n# Definition for a Node.\nclass Node:\n def __init__(self, x: int, next: 'Node'(...TRUNCATED) | 12 |
139 | word-break | "<p>Given a string <code>s</code> and a dictionary of strings <code>wordDict</code>, return <code>tr(...TRUNCATED) | 47.228119 | Medium | [
"array",
"hash-table",
"string",
"dynamic-programming",
"trie",
"memoization"
] | "{\"lang\": \"python3\", \"distribution\": [[\"15\", 0.0045], [\"16\", 0.0045], [\"17\", 0.0045], [\(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"16100\", 0.009], [\"16200\", 0.0135], [\"16300\", 0.1(...TRUNCATED) | [{"code":"class Solution:\n def wordBreak(self, s: str, wordDict: List[str]) -> bool:\n\n (...TRUNCATED) | 69 | [{"code":"results = 0\n \ndef wordBreak(s: str, d):\n n = len(s)\n dp = [False] * (n + 1)\n(...TRUNCATED) | 26 |
140 | word-break-ii | "<p>Given a string <code>s</code> and a dictionary of strings <code>wordDict</code>, add spaces in <(...TRUNCATED) | 51.718036 | Hard | [
"array",
"hash-table",
"string",
"dynamic-programming",
"backtracking",
"trie",
"memoization"
] | "{\"lang\": \"python3\", \"distribution\": [[\"15\", 0.0406], [\"16\", 0.0609], [\"17\", 0.0203], [\(...TRUNCATED) | "{\"lang\": \"python3\", \"distribution\": [[\"16200\", 0.1015], [\"16300\", 1.9484], [\"16400\", 14(...TRUNCATED) | [{"code":"class Solution:\n def wordBreak(self, s: str, wordDict: List[str]) -> List[str]:\n (...TRUNCATED) | 45 | [{"code":"class Solution:\n def wordBreak(self, s: str, wordDict: List[str]) -> List[str]:\n (...TRUNCATED) | 8 |
End of preview. Expand
in Dataset Viewer.
README.md exists but content is empty.
Use the Edit dataset card button to edit it.
- Downloads last month
- 36