jobsearch v0.0.1

← anthropic / Anthropic Fellows Program, ML Systems & Performance

coding_drills / art_NLv3ylOFwXQ

Content

{"kind": "coding_drills", "role_id": "role_aVmZEl6cmh0", "source": "leetcode_graphql", "generated_at": "2026-05-21T22:40:22.986948+00:00", "difficulty_mix": {"Easy": 3, "Medium": 5, "Hard": 2}, "topics_filter": [], "questions": [{"index": 0, "category": "coding_two_pointers", "question": "[Easy] LC #28 \u00b7 Find the Index of the First Occurrence in a String \u2014 solve on leetcode.com", "why": "Topic tags: two-pointers, string, string-matching. AC rate 46.6%. Open the editor at https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "find-the-index-of-the-first-occurrence-in-a-string", "frontend_id": "28", "difficulty": "Easy", "ac_rate": 46.646679248066825, "topics": ["two-pointers", "string", "string-matching"], "url": "https://leetcode.com/problems/find-the-index-of-the-first-occurrence-in-a-string/", "problem_html": "<p>Given two strings <code>needle</code> and <code>haystack</code>, return the index of the first occurrence of <code>needle</code> in <code>haystack</code>, or <code>-1</code> if <code>needle</code> is not part of <code>haystack</code>.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> haystack = &quot;sadbutsad&quot;, needle = &quot;sad&quot;\n<strong>Output:</strong> 0\n<strong>Explanation:</strong> &quot;sad&quot; occurs at index 0 and 6.\nThe first occurrence is at index 0, so we return 0.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> haystack = &quot;leetcode&quot;, needle = &quot;leeto&quot;\n<strong>Output:</strong> -1\n<strong>Explanation:</strong> &quot;leeto&quot; did not occur in &quot;leetcode&quot;, so we return -1.\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= haystack.length, needle.length &lt;= 10<sup>4</sup></code></li>\n\t<li><code>haystack</code> and <code>needle</code> consist of only lowercase English characters.</li>\n</ul>\n", "hints": []}}, {"index": 1, "category": "coding_string", "question": "[Easy] LC #20 \u00b7 Valid Parentheses \u2014 solve on leetcode.com", "why": "Topic tags: string, stack. AC rate 44.2%. Open the editor at https://leetcode.com/problems/valid-parentheses/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "valid-parentheses", "frontend_id": "20", "difficulty": "Easy", "ac_rate": 44.1741531650066, "topics": ["string", "stack"], "url": "https://leetcode.com/problems/valid-parentheses/", "problem_html": "<p>Given a string <code>s</code> containing just the characters <code>&#39;(&#39;</code>, <code>&#39;)&#39;</code>, <code>&#39;{&#39;</code>, <code>&#39;}&#39;</code>, <code>&#39;[&#39;</code> and <code>&#39;]&#39;</code>, determine if the input string is valid.</p>\n\n<p>An input string is valid if:</p>\n\n<ol>\n\t<li>Open brackets must be closed by the same type of brackets.</li>\n\t<li>Open brackets must be closed in the correct order.</li>\n\t<li>Every close bracket has a corresponding open bracket of the same type.</li>\n</ol>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong> <span class=\"example-io\">s = &quot;()&quot;</span></p>\n\n<p><strong>Output:</strong> <span class=\"example-io\">true</span></p>\n</div>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong> <span class=\"example-io\">s = &quot;()[]{}&quot;</span></p>\n\n<p><strong>Output:</strong> <span class=\"example-io\">true</span></p>\n</div>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong> <span class=\"example-io\">s = &quot;(]&quot;</span></p>\n\n<p><strong>Output:</strong> <span class=\"example-io\">false</span></p>\n</div>\n\n<p><strong class=\"example\">Example 4:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong> <span class=\"example-io\">s = &quot;([])&quot;</span></p>\n\n<p><strong>Output:</strong> <span class=\"example-io\">true</span></p>\n</div>\n\n<p><strong class=\"example\">Example 5:</strong></p>\n\n<div class=\"example-block\">\n<p><strong>Input:</strong> <span class=\"example-io\">s = &quot;([)]&quot;</span></p>\n\n<p><strong>Output:</strong> <span class=\"example-io\">false</span></p>\n</div>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= s.length &lt;= 10<sup>4</sup></code></li>\n\t<li><code>s</code> consists of parentheses only <code>&#39;()[]{}&#39;</code>.</li>\n</ul>\n", "hints": ["Use a stack of characters.", "When you encounter an opening bracket, push it to the top of the stack.", "When you encounter a closing bracket, check if the top of the stack was the opening for it. If yes, pop it from the stack. Otherwise, return false."]}}, {"index": 2, "category": "coding_hash_table", "question": "[Easy] LC #13 \u00b7 Roman to Integer \u2014 solve on leetcode.com", "why": "Topic tags: hash-table, math, string. AC rate 66.6%. Open the editor at https://leetcode.com/problems/roman-to-integer/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "roman-to-integer", "frontend_id": "13", "difficulty": "Easy", "ac_rate": 66.6294901822322, "topics": ["hash-table", "math", "string"], "url": "https://leetcode.com/problems/roman-to-integer/", "problem_html": "<p>Roman numerals are represented by seven different symbols:&nbsp;<code>I</code>, <code>V</code>, <code>X</code>, <code>L</code>, <code>C</code>, <code>D</code> and <code>M</code>.</p>\n\n<pre>\n<strong>Symbol</strong>       <strong>Value</strong>\nI             1\nV             5\nX             10\nL             50\nC             100\nD             500\nM             1000</pre>\n\n<p>For example,&nbsp;<code>2</code> is written as <code>II</code>&nbsp;in Roman numeral, just two ones added together. <code>12</code> is written as&nbsp;<code>XII</code>, which is simply <code>X + II</code>. The number <code>27</code> is written as <code>XXVII</code>, which is <code>XX + V + II</code>.</p>\n\n<p>Roman numerals are usually written largest to smallest from left to right. However, the numeral for four is not <code>IIII</code>. Instead, the number four is written as <code>IV</code>. Because the one is before the five we subtract it making four. The same principle applies to the number nine, which is written as <code>IX</code>. There are six instances where subtraction is used:</p>\n\n<ul>\n\t<li><code>I</code> can be placed before <code>V</code> (5) and <code>X</code> (10) to make 4 and 9.&nbsp;</li>\n\t<li><code>X</code> can be placed before <code>L</code> (50) and <code>C</code> (100) to make 40 and 90.&nbsp;</li>\n\t<li><code>C</code> can be placed before <code>D</code> (500) and <code>M</code> (1000) to make 400 and 900.</li>\n</ul>\n\n<p>Given a roman numeral, convert it to an integer.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;III&quot;\n<strong>Output:</strong> 3\n<strong>Explanation:</strong> III = 3.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;LVIII&quot;\n<strong>Output:</strong> 58\n<strong>Explanation:</strong> L = 50, V= 5, III = 3.\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;MCMXCIV&quot;\n<strong>Output:</strong> 1994\n<strong>Explanation:</strong> M = 1000, CM = 900, XC = 90 and IV = 4.\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= s.length &lt;= 15</code></li>\n\t<li><code>s</code> contains only&nbsp;the characters <code>(&#39;I&#39;, &#39;V&#39;, &#39;X&#39;, &#39;L&#39;, &#39;C&#39;, &#39;D&#39;, &#39;M&#39;)</code>.</li>\n\t<li>It is <strong>guaranteed</strong>&nbsp;that <code>s</code> is a valid roman numeral in the range <code>[1, 3999]</code>.</li>\n</ul>\n", "hints": ["Problem is simpler to solve by working the string from back to front and using a map."]}}, {"index": 3, "category": "coding_array", "question": "[Medium] LC #18 \u00b7 4Sum \u2014 solve on leetcode.com", "why": "Topic tags: array, two-pointers, sorting. AC rate 40.6%. Open the editor at https://leetcode.com/problems/4sum/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "4sum", "frontend_id": "18", "difficulty": "Medium", "ac_rate": 40.63108370993898, "topics": ["array", "two-pointers", "sorting"], "url": "https://leetcode.com/problems/4sum/", "problem_html": "<p>Given an array <code>nums</code> of <code>n</code> integers, return <em>an array of all the <strong>unique</strong> quadruplets</em> <code>[nums[a], nums[b], nums[c], nums[d]]</code> such that:</p>\n\n<ul>\n\t<li><code>0 &lt;= a, b, c, d&nbsp;&lt; n</code></li>\n\t<li><code>a</code>, <code>b</code>, <code>c</code>, and <code>d</code> are <strong>distinct</strong>.</li>\n\t<li><code>nums[a] + nums[b] + nums[c] + nums[d] == target</code></li>\n</ul>\n\n<p>You may return the answer in <strong>any order</strong>.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> nums = [1,0,-1,0,-2,2], target = 0\n<strong>Output:</strong> [[-2,-1,1,2],[-2,0,0,2],[-1,0,0,1]]\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> nums = [2,2,2,2,2], target = 8\n<strong>Output:</strong> [[2,2,2,2]]\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= nums.length &lt;= 200</code></li>\n\t<li><code>-10<sup>9</sup> &lt;= nums[i] &lt;= 10<sup>9</sup></code></li>\n\t<li><code>-10<sup>9</sup> &lt;= target &lt;= 10<sup>9</sup></code></li>\n</ul>\n", "hints": []}}, {"index": 4, "category": "coding_array", "question": "[Medium] LC #47 \u00b7 Permutations II \u2014 solve on leetcode.com", "why": "Topic tags: array, backtracking, sorting. AC rate 63.4%. Open the editor at https://leetcode.com/problems/permutations-ii/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "permutations-ii", "frontend_id": "47", "difficulty": "Medium", "ac_rate": 63.442757384313076, "topics": ["array", "backtracking", "sorting"], "url": "https://leetcode.com/problems/permutations-ii/", "problem_html": "<p>Given a collection of numbers, <code>nums</code>,&nbsp;that might contain duplicates, return <em>all possible unique permutations <strong>in any order</strong>.</em></p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> nums = [1,1,2]\n<strong>Output:</strong>\n[[1,1,2],\n [1,2,1],\n [2,1,1]]\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> nums = [1,2,3]\n<strong>Output:</strong> [[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1]]\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>1 &lt;= nums.length &lt;= 8</code></li>\n\t<li><code>-10 &lt;= nums[i] &lt;= 10</code></li>\n</ul>\n", "hints": []}}, {"index": 5, "category": "coding_hash_table", "question": "[Medium] LC #3 \u00b7 Longest Substring Without Repeating Characters \u2014 solve on leetcode.com", "why": "Topic tags: hash-table, string, sliding-window. AC rate 39.1%. Open the editor at https://leetcode.com/problems/longest-substring-without-repeating-characters/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "longest-substring-without-repeating-characters", "frontend_id": "3", "difficulty": "Medium", "ac_rate": 39.05112220358377, "topics": ["hash-table", "string", "sliding-window"], "url": "https://leetcode.com/problems/longest-substring-without-repeating-characters/", "problem_html": "<p>Given a string <code>s</code>, find the length of the <strong>longest</strong> <span data-keyword=\"substring-nonempty\"><strong>substring</strong></span> without duplicate characters.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;abcabcbb&quot;\n<strong>Output:</strong> 3\n<strong>Explanation:</strong> The answer is &quot;abc&quot;, with the length of 3. Note that <code>&quot;bca&quot;</code> and <code>&quot;cab&quot;</code> are also correct answers.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;bbbbb&quot;\n<strong>Output:</strong> 1\n<strong>Explanation:</strong> The answer is &quot;b&quot;, with the length of 1.\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;pwwkew&quot;\n<strong>Output:</strong> 3\n<strong>Explanation:</strong> The answer is &quot;wke&quot;, with the length of 3.\nNotice that the answer must be a substring, &quot;pwke&quot; is a subsequence and not a substring.\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>0 &lt;= s.length &lt;= 5 * 10<sup>4</sup></code></li>\n\t<li><code>s</code> consists of English letters, digits, symbols and spaces.</li>\n</ul>\n", "hints": ["Since maximum string size is at most 26, generate and check all possible substrings with length at most 26."]}}, {"index": 6, "category": "coding_array", "question": "[Medium] LC #16 \u00b7 3Sum Closest \u2014 solve on leetcode.com", "why": "Topic tags: array, two-pointers, sorting. AC rate 48.6%. Open the editor at https://leetcode.com/problems/3sum-closest/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "3sum-closest", "frontend_id": "16", "difficulty": "Medium", "ac_rate": 48.5626587798824, "topics": ["array", "two-pointers", "sorting"], "url": "https://leetcode.com/problems/3sum-closest/", "problem_html": "<p>Given an integer array <code>nums</code> of length <code>n</code> and an integer <code>target</code>, find three integers at <strong>distinct indices</strong> in <code>nums</code> such that the sum is closest to <code>target</code>.</p>\n\n<p>Return <em>the sum of the three integers</em>.</p>\n\n<p>You may assume that each input would have exactly one solution.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> nums = [-1,2,1,-4], target = 1\n<strong>Output:</strong> 2\n<strong>Explanation:</strong> The sum that is closest to the target is 2. (-1 + 2 + 1 = 2).\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> nums = [0,0,0], target = 1\n<strong>Output:</strong> 0\n<strong>Explanation:</strong> The sum that is closest to the target is 0. (0 + 0 + 0 = 0).\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>3 &lt;= nums.length &lt;= 500</code></li>\n\t<li><code>-1000 &lt;= nums[i] &lt;= 1000</code></li>\n\t<li><code>-10<sup>4</sup> &lt;= target &lt;= 10<sup>4</sup></code></li>\n</ul>\n", "hints": []}}, {"index": 7, "category": "coding_math", "question": "[Medium] LC #29 \u00b7 Divide Two Integers \u2014 solve on leetcode.com", "why": "Topic tags: math, bit-manipulation. AC rate 19.8%. Open the editor at https://leetcode.com/problems/divide-two-integers/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "divide-two-integers", "frontend_id": "29", "difficulty": "Medium", "ac_rate": 19.778929080081173, "topics": ["math", "bit-manipulation"], "url": "https://leetcode.com/problems/divide-two-integers/", "problem_html": "<p>Given two integers <code>dividend</code> and <code>divisor</code>, divide two integers <strong>without</strong> using multiplication, division, and mod operator.</p>\n\n<p>The integer division should truncate toward zero, which means losing its fractional part. For example, <code>8.345</code> would be truncated to <code>8</code>, and <code>-2.7335</code> would be truncated to <code>-2</code>.</p>\n\n<p>Return <em>the <strong>quotient</strong> after dividing </em><code>dividend</code><em> by </em><code>divisor</code>.</p>\n\n<p><strong>Note: </strong>Assume we are dealing with an environment that could only store integers within the <strong>32-bit</strong> signed integer range: <code>[&minus;2<sup>31</sup>, 2<sup>31</sup> &minus; 1]</code>. For this problem, if the quotient is <strong>strictly greater than</strong> <code>2<sup>31</sup> - 1</code>, then return <code>2<sup>31</sup> - 1</code>, and if the quotient is <strong>strictly less than</strong> <code>-2<sup>31</sup></code>, then return <code>-2<sup>31</sup></code>.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> dividend = 10, divisor = 3\n<strong>Output:</strong> 3\n<strong>Explanation:</strong> 10/3 = 3.33333.. which is truncated to 3.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> dividend = 7, divisor = -3\n<strong>Output:</strong> -2\n<strong>Explanation:</strong> 7/-3 = -2.33333.. which is truncated to -2.\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>-2<sup>31</sup> &lt;= dividend, divisor &lt;= 2<sup>31</sup> - 1</code></li>\n\t<li><code>divisor != 0</code></li>\n</ul>\n", "hints": []}}, {"index": 8, "category": "coding_array", "question": "[Hard] LC #42 \u00b7 Trapping Rain Water \u2014 solve on leetcode.com", "why": "Topic tags: array, two-pointers, dynamic-programming, stack, monotonic-stack. AC rate 67.3%. Open the editor at https://leetcode.com/problems/trapping-rain-water/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "trapping-rain-water", "frontend_id": "42", "difficulty": "Hard", "ac_rate": 67.34977527551528, "topics": ["array", "two-pointers", "dynamic-programming", "stack", "monotonic-stack"], "url": "https://leetcode.com/problems/trapping-rain-water/", "problem_html": "<p>Given <code>n</code> non-negative integers representing an elevation map where the width of each bar is <code>1</code>, compute how much water it can trap after raining.</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n<img src=\"https://assets.leetcode.com/uploads/2018/10/22/rainwatertrap.png\" style=\"width: 412px; height: 161px;\" />\n<pre>\n<strong>Input:</strong> height = [0,1,0,2,1,0,1,3,2,1,2,1]\n<strong>Output:</strong> 6\n<strong>Explanation:</strong> The above elevation map (black section) is represented by array [0,1,0,2,1,0,1,3,2,1,2,1]. In this case, 6 units of rain water (blue section) are being trapped.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> height = [4,2,0,3,2,5]\n<strong>Output:</strong> 9\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>n == height.length</code></li>\n\t<li><code>1 &lt;= n &lt;= 2 * 10<sup>4</sup></code></li>\n\t<li><code>0 &lt;= height[i] &lt;= 10<sup>5</sup></code></li>\n</ul>\n", "hints": []}}, {"index": 9, "category": "coding_string", "question": "[Hard] LC #44 \u00b7 Wildcard Matching \u2014 solve on leetcode.com", "why": "Topic tags: string, dynamic-programming, greedy, recursion. AC rate 32.0%. Open the editor at https://leetcode.com/problems/wildcard-matching/, talk through your approach, then sketch the algorithm here (whiteboard) or write a plain-English solution (typed).", "how_to_prepare": "Clarify constraints, propose a brute-force, refine to an optimal time/space, walk through 2 example inputs (including an edge case), then trace your final code by hand.", "leetcode": {"title_slug": "wildcard-matching", "frontend_id": "44", "difficulty": "Hard", "ac_rate": 31.971355472696484, "topics": ["string", "dynamic-programming", "greedy", "recursion"], "url": "https://leetcode.com/problems/wildcard-matching/", "problem_html": "<p>Given an input string (<code>s</code>) and a pattern (<code>p</code>), implement wildcard pattern matching with support for <code>&#39;?&#39;</code> and <code>&#39;*&#39;</code> where:</p>\n\n<ul>\n\t<li><code>&#39;?&#39;</code> Matches any single character.</li>\n\t<li><code>&#39;*&#39;</code> Matches any sequence of characters (including the empty sequence).</li>\n</ul>\n\n<p>The matching should cover the <strong>entire</strong> input string (not partial).</p>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;aa&quot;, p = &quot;a&quot;\n<strong>Output:</strong> false\n<strong>Explanation:</strong> &quot;a&quot; does not match the entire string &quot;aa&quot;.\n</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;aa&quot;, p = &quot;*&quot;\n<strong>Output:</strong> true\n<strong>Explanation:</strong>&nbsp;&#39;*&#39; matches any sequence.\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> s = &quot;cb&quot;, p = &quot;?a&quot;\n<strong>Output:</strong> false\n<strong>Explanation:</strong>&nbsp;&#39;?&#39; matches &#39;c&#39;, but the second letter is &#39;a&#39;, which does not match &#39;b&#39;.\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li><code>0 &lt;= s.length, p.length &lt;= 2000</code></li>\n\t<li><code>s</code> contains only lowercase English letters.</li>\n\t<li><code>p</code> contains only lowercase English letters, <code>&#39;?&#39;</code> or <code>&#39;*&#39;</code>.</li>\n</ul>\n", "hints": []}}]}