{"count":43,"next_page":"https://support.leetcode.com/api/v2/help_center/en-us/articles.json?page=2&per_page=30","page":1,"page_count":2,"per_page":30,"previous_page":null,"articles":[{"id":32442719377939,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/32442719377939.json","html_url":"https://support.leetcode.com/hc/en-us/articles/32442719377939-How-to-create-test-cases-on-LeetCode","author_id":368444092054,"comments_disabled":false,"draft":false,"promoted":true,"position":0,"vote_sum":56,"vote_count":122,"upvote_count":89,"downvote_count":33,"section_id":360002895993,"created_at":"2024-08-16T21:43:15Z","updated_at":"2026-11-01T06:21:58Z","name":"How to create test cases on LeetCode?","title":"How to create test cases on LeetCode?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2024-08-17T22:52:04Z","user_segment_id":null,"permission_group_id":2491654,"body":"<h1 id=\"h_01J5FFP9W8XEMF1RCCKM8K5BEQ\">1.  General Introduction</h1>\n<p>Before submitting your solution, it's recommended to test your code against various test cases, especially the sample ones provided in the problem statement.</p>\n<p>The test case area is pre-populated with example test cases by default, but you can modify these cases to test different scenarios. The image below highlights the test case area in red.</p>\n<p><strong>Example</strong>: Let's use the problem <em><a href=\"https://leetcode.com/problems/find-the-sum-of-subsequence-powers/\" target=\"_blank\" rel=\"noopener noreferrer\">Find the Sum of Subsequence Powers</a></em> as a reference.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/32446227861011\" alt=\"image (33).png\"></p>\n<p>After setting up your test cases, click \"Run\" to execute them on LeetCode's server. This will display the results, helping you check the output of your code against these test cases. Once you've addressed any issues in your code, click the \"Submit\" button to thoroughly verify your solution, as this will run your code against all system test cases to ensure its correctness.<br><br></p>\n<hr>\n<p> </p>\n<h1 id=\"h_01J5H1SJT71F7D7FDFXWJD5N4H\">2.  Input Modes</h1>\n<p>When entering test cases, you can choose between two input modes: Tab-Based or Raw. To switch between them, click on the <code>&lt;/&gt; Source</code> button located below the test case panel.<br><br></p>\n<h2 id=\"h_01J5FFP9W9GGS5K2YEFSCA7RXQ\">2.1  Tab-Based Input</h2>\n<p>This mode provides a structured and user-friendly interface. You can input parameters one by one using the graphical interface. For example, to input a test case with <code>nums = [2, 3, 1, 4]</code> and <code>k = 2</code>, simply enter these values in their respective fields.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/32446227862931\" alt=\"image (34).png\"></p>\n<p> </p>\n<h2 id=\"h_01J5FFP9W9N03FZ344TVFEVHPM\">2.2  Raw Input</h2>\n<p>In Raw Input mode, you enter parameters on separate lines. To test multiple cases, you can input them consecutively. Here's an example of how to input two test cases:</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/32446249400979\" alt=\"image (35).png\"></p>\n<p>This method is particularly useful when you need to input or edit multiple test cases at once.<br><br></p>\n<hr>\n<p> </p>\n<h1 id=\"h_01J5FFP9W92CCJCZMTPCGZFXZ4\">3.  Understanding LeetCode Input Formats</h1>\n<p>Correctly inputting test cases in LeetCode is crucial for testing and debugging your code. This section guides you through the various input types you'll encounter, from basic data types to complex custom data structures and special input scenarios.<br><br></p>\n<h2 id=\"h_01J5FFP9W93D9QTN501ZR405ZJ\">3.1  Basic Data Types</h2>\n<p>This section covers fundamental data types like integers, booleans, characters, and strings. These are the building blocks for more complex data structures, so mastering their input format is essential for handling advanced structures.</p>\n<div>\n<table class=\"ace-table\" style=\"border: none; border-collapse: collapse; table-layout: fixed; width: 807px; height: 578px;\" data-ace-table-col-widths=\"100;324;225;273\">\n<colgroup> <col width=\"100\"> <col width=\"324\"> <col width=\"225\"> <col width=\"273\"> </colgroup>\n<thead>\n<tr style=\"height: 39px;\">\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 83.4549px; height: 22px;\" colspan=\"1\" rowspan=\"1\">\n<p><strong>Type</strong></p>\n</th>\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 307.448px; height: 22px;\" colspan=\"1\" rowspan=\"1\">\n<p><strong>Description</strong></p>\n</th>\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 208.455px; height: 22px;\" colspan=\"1\" rowspan=\"1\">\n<p><strong>Examples</strong></p>\n</th>\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 256.45px; height: 22px;\" colspan=\"1\" rowspan=\"1\">\n<p><strong>Notes</strong></p>\n</th>\n</tr>\n</thead>\n<tbody>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 83.4549px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<div>integer</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 307.448px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<div>A numerical data type that represents whole numbers without any decimal component. Typically 4 bytes (32 bits) in size.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 208.455px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li>\n<div><code>-1</code></div>\n</li>\n<li>\n<div><code>0</code></div>\n</li>\n<li>\n<div><code>2147483647</code></div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 256.45px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<div>The range for an integer is [-2<sup>31</sup>, 2<sup>31</sup>-1].</div>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 83.4549px; height: 87px;\" colspan=\"1\" rowspan=\"1\">\n<div>long</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 307.448px; height: 87px;\" colspan=\"1\" rowspan=\"1\">\n<div>An extended version of the integer type that can store larger numerical values. Typically 8 bytes (64 bits) in size.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 208.455px; height: 87px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li>\n<div><code>-1</code></div>\n</li>\n<li>\n<div><code>0</code></div>\n</li>\n<li>\n<div><code>-9223372036854775808</code></div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 256.45px; height: 87px;\" colspan=\"1\" rowspan=\"1\">\n<div>The range for a long integer is [−2<sup>63</sup>, 2<sup>63</sup>-1].</div>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 83.4549px; height: 43px;\" colspan=\"1\" rowspan=\"1\">\n<div>boolean</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 307.448px; height: 43px;\" colspan=\"1\" rowspan=\"1\">\n<div>A data type that represents one of two binary values: <code>true</code> or <code>false</code>.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 208.455px; height: 43px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li>\n<div><code>true</code></div>\n</li>\n<li>\n<div><code>false</code></div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 256.45px; height: 43px;\" colspan=\"1\" rowspan=\"1\"> </td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 83.4549px; height: 127px;\" colspan=\"1\" rowspan=\"1\">\n<div>double</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 307.448px; height: 127px;\" colspan=\"1\" rowspan=\"1\">\n<div>A numerical data type used to represent floating-point numbers with decimal notation. Typically 8 bytes (64 bits) in size.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 208.455px; height: 127px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li>\n<div><code>245.32</code></div>\n</li>\n<li>\n<div><code>1.0000</code></div>\n</li>\n<li>\n<div><code>-1000000000000.2345</code></div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 256.45px; height: 127px;\" colspan=\"1\" rowspan=\"1\">\n<div>The range for a double is approximately [−1.7 × 10<sup>308</sup>, 1.7 × 10<sup>308</sup>].</div>\n<div>Avoid using commas or multiple decimal points.</div>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 83.4549px; height: 129px;\" colspan=\"1\" rowspan=\"1\">\n<div>character</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 307.448px; height: 129px;\" colspan=\"1\" rowspan=\"1\">\n<div>A data type that represents a single alphanumeric character, symbol, or punctuation mark. Typically 1 byte (8 bits) in size, supporting ASCII.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 208.455px; height: 129px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li>\n<div><code>\"a\"</code></div>\n</li>\n<li>\n<div>\n<code>\"\\n\"</code> newline</div>\n</li>\n<li>\n<div>\n<code>\"\\\\\"</code> backslash</div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 256.45px; height: 129px;\" colspan=\"1\" rowspan=\"1\">\n<div>Character must be within the standard ASCII range (0 to 127).</div>\n<div>A character must be enclosed in double quotes (<code>\"</code>). Use escape sequences (e.g., <code>\\\\</code> for backslash) where necessary.</div>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 83.4549px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<div>string</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 307.448px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<div>A sequence of characters, including letters, digits, punctuation, whitespace, and other symbols.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 208.455px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li>\n<div>\n<code>\"\"</code> empty string</div>\n</li>\n<li>\n<div><code>\"Hello world\"</code></div>\n</li>\n<li>\n<div><code>\"1337's \\\"world\\\"\"</code></div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 256.45px; height: 85px;\" colspan=\"1\" rowspan=\"1\">\n<div>Strings must be enclosed in double quotes (<code>\"</code>). Each character in the string must be within the standard ASCII range (0 to 127).</div>\n</td>\n</tr>\n</tbody>\n</table>\n</div>\n<p> </p>\n<h2 id=\"h_01J5EGREAW3NAEJ14XC07GRW1A\" class=\"heading-2\">3.2  Standard Data Structures</h2>\n<p>LeetCode problems often involve complex data structures like Linked Lists and Binary Trees, which are pre-defined to save you time. The table below shows how to format and input these structures for your test cases.</p>\n<table class=\"ace-table\" style=\"border: none; border-collapse: collapse; table-layout: fixed; width: 894px;\" data-ace-table-col-widths=\"100;236;236;254\">\n<colgroup> <col width=\"100\"> <col width=\"236\"> <col width=\"236\"> <col width=\"254\"> </colgroup>\n<thead>\n<tr style=\"height: 39px;\">\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 91.6146px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-J9iLd6DplotBDpxFJ8QcqJaunWb\"><strong>Type</strong></div>\n</th>\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-U3QGdY1jMoPZbJxmtk5cXmYBnFe\"><strong>Description</strong></div>\n</th>\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-HTHQd4f7OojegLxtSE0cvEJ9nhf\"><strong>Examples</strong></div>\n</th>\n<th style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; font-weight: 500; background-color: #f2f3f5; text-align: left; width: 258.194px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-ILMcdukNzo0E3qxJUNTcnR3hnQd\"><strong>Notes</strong></div>\n</th>\n</tr>\n</thead>\n<tbody>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 91.6146px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-B7XsdlAWwoO5yFxMH3LcE11Qnne\">Array</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-CV77dlzaIotnrDxsQaycX1NMncc\">A data structure that holds a sequence of elements of the same data type.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li class=\"ace-line ace-line old-record-id-LMItdvorgoFL8sxxsOec957Kncz\" data-list=\"number\">\n<div>\n<code>[]</code> Empty array.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-IGRJdUvSyo51eux9YzLcnSKfnbh\" data-list=\"number\">\n<div>\n<code>[1]</code> Single integer.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-ZWukdaVhYoF5UPxZ2v2cXiXhnJG\" data-list=\"number\">\n<div>\n<code>[\"a\",\"hello\",\"world\"]</code> 3 strings.</div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 258.194px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-Wk0AdnRGYoNizMxNTowcdykKntc\">Arrays must contain elements of the same data type.</div>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 91.6146px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-OniXd5rTboxXyqxsd3wcfTCsn8g\">2D Array</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-REAPdHWzcoYOyaxSZ7mcpTPSnve\">An array of arrays, where each sub-array represents a row. It can hold elements in a matrix-like structure.</div>\n<div class=\"ace-line ace-line old-record-id-XzGId0Ft8o62dBxKkEGci2sUnJb\"></div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li class=\"ace-line ace-line old-record-id-Biz8dLV9boGVSgxGp6hcXj8unvd\" data-list=\"number\">\n<div>\n<code>[]</code> Empty 2D array.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-FdoidnqKGox6rBxD7zfcbiRFnGY\" data-list=\"number\">\n<div>\n<code>[[]]</code> 1 row, 0 elements.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-DhjbdLNOVoe9gJxx5jhcLANun9e\" data-list=\"number\">\n<div>\n<code>[[1]]</code> 1 row, 1 element.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-V53edHG7koqt57xceA0cBh0lnRg\" data-list=\"number\">\n<div>\n<code>[[1,2],[3,4]]</code> 2x2 array.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-V6hldFwLIoHUZ8xiDqMcQ69fnSh\" data-list=\"number\">\n<div>\n<code>[[1],[2,3],[4,5,6]]</code> 3 rows.</div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 258.194px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-UNg6d1M7sowvBHx7k6pck7Hpnge\">2D arrays can either have a fixed number of columns (e.g., <code>int[,]</code> in C#) or a variable number of columns (e.g., <code>int[][]</code> in C#). Always check the problem's requirements or the programming language's specifics to understand the structure.</div>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 91.6146px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-GmeRdreUrocrk2xxK6vcorhznxb\">Linked List</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-AGtbd8yWpozqxYxhgwscq2cvnbh\">A linear data structure consisting of nodes where each node contains a value and a reference to the next node.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li class=\"ace-line ace-line old-record-id-SXVkduUmCob71SxLRygc853bn7e\" data-list=\"number\">\n<div>\n<code>[]</code> Empty linked list.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-G6UndfofXo0TcHxEhLIcxx1anCd\" data-list=\"number\">\n<div>\n<code>[1]</code> List with 1 node.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-JhUDdbTbCoj0GqxBjA7ctXIHndb\" data-list=\"number\">\n<div>\n<code>[-1,0]</code> 2-node list.</div>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 258.194px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-B8qkd9iCaog7GOxT0FEc0hKNnGb\"><strong>Serialized Format:</strong></div>\n<ul class=\"list-bullet1\" style=\"padding-left: 0px; margin-top: 2px;\">\n<li class=\"ace-line ace-line old-record-id-UO0mdx8Qjo3C5Exvg75cORPcn1g\" data-list=\"bullet\">\n<div>\n<code>[1, 2, 3]</code> is <strong>not</strong> an array but a way to represent a linked list in a printable format. In this format, each number represents a node's value, and the sequence shows how the nodes are connected.</div>\n</li>\n<li class=\"ace-line ace-line old-record-id-USZudQuZvoVsFxxWwnQc8OSinBc\" data-list=\"bullet\">\n<div>The list <code>[1, 2, 3]</code> would look like this in a linked list:</div>\n<pre> 1 -&gt; 2 -&gt; 3<br> ^<br> |<br>head</pre>\n</li>\n<li class=\"ace-line ace-line old-record-id-RgApdxbc6oYirlxyV3fcvPP0nMg\" data-list=\"bullet\">\n<div>\n<code>[]</code> is not an empty array but represents an empty linked list, where the head is a reference to <code>NULL</code> (C/C++), <code>null</code> (Java/C#/JavaScript), <code>None</code> (Python), or <code>nil</code> (Ruby).</div>\n</li>\n</ul>\n<p> </p>\n<p><strong>Note:</strong> Always use the provided <code>ListNode</code> class/type, and do not define it yourself.</p>\n</td>\n</tr>\n<tr style=\"height: 39px;\">\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 91.6146px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-NaIodpULDoKnKgxy26JcHlR9nBf\">Binary Tree</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-AGtbd8yWpozqxYxhgwscq2cvnbh\">A tree data structure in which each node has at most two children, referred to as the left and right child.</div>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 238.724px;\" colspan=\"1\" rowspan=\"1\">\n<ol class=\"list-number1\" style=\"padding-left: 0px; margin-top: 2px;\" start=\"1\">\n<li class=\"ace-line ace-line old-record-id-GwGAdLDGRo8iKxxn675cFUwincd\" data-list=\"number\">\n<div>\n<code>[]</code> Empty tree.</div>\n</li>\n<li>\n<div><code>[1,2,3]</code></div>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.leetcode.com/hc/article_attachments/32446227865875\" alt=\"download_image (3).png\" width=\"134\" height=\"115\"></p>\n</li>\n<li class=\"ace-line ace-line old-record-id-FmI3dq7Nfogf8xxNDApc4H54nze\" style=\"text-align: left;\" data-list=\"number\">\n<div><code>[1,null,2,3]</code></div>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.leetcode.com/hc/article_attachments/32446249402771\" alt=\"download_image (4).png\" width=\"77\" height=\"154\"></p>\n</li>\n<li class=\"ace-line ace-line old-record-id-DAG9d1S0YoJJeoxZuPYcOi6Gnbd\" style=\"text-align: left;\" data-list=\"number\">\n<div><code>[5,4,7,3,null,2,null,-1,null,9]</code></div>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.leetcode.com/hc/article_attachments/32446249404435\" alt=\"download_image (5).png\" width=\"182\" height=\"193\"></p>\n</li>\n</ol>\n</td>\n<td style=\"border: 1px solid #dee0e3; font-size: 10pt; padding: 8px; vertical-align: top; width: 258.194px;\" colspan=\"1\" rowspan=\"1\">\n<div class=\"ace-line ace-line old-record-id-B8qkd9iCaog7GOxT0FEc0hKNnGb\"><strong>Serialized Format:</strong></div>\n<ul style=\"padding-left: 0px; margin-top: 2px;\">\n<li>\n<div>\n<code>[1, null, 2, 3]</code> is <strong>not</strong> an array but a way to represent a binary tree in a printable format using <strong><a href=\"https://leetcode.com/problems/binary-tree-level-order-traversal/description/\" target=\"_blank\" rel=\"noopener noreferrer\">level order traversal</a></strong>. In level order traversal, the tree is traversed level by level, from top to bottom and left to right.</div>\n</li>\n<li>\n<div>The <code>null</code> value is used to indicate where a node is missing in the tree. It shows that there is no node present in that position, which helps you understand the overall shape of the tree, especially when some branches are incomplete.</div>\n</li>\n<li>\n<div>\n<code>[]</code> is not an empty array but represents an empty binary tree, where the root is a reference to <code>NULL</code> (C/C++), <code>null</code> (Java/C#/JavaScript), <code>None</code> (Python), or <code>nil</code> (Ruby).</div>\n</li>\n</ul>\n<p> </p>\n<p><strong>Note:</strong> Always use the provided <code>TreeNode</code> class/type, and do not define it yourself.</p>\n</td>\n</tr>\n</tbody>\n</table>\n<p> </p>\n<h2 id=\"h_01J5EGREAX2Q0FZRZ4RM3KYJQ0\" class=\"heading-2\">3.3  Custom Data Structures</h2>\n<p>Some LeetCode problems define custom types or data structures specific to the problem. The structure and input format are detailed in the problem description. The type or data structure definition, including its implemented class, constructor, and helper methods, is provided in the description and code comments.</p>\n<p><strong>Examples:</strong></p>\n<ol>\n<li class=\" old-record-id-JOFFdUGFkotpeRxqLAHcRifXngb\">\n<strong>N-ary Tree</strong><br><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">An extension of a Binary Tree where each node can have any number of children.</span><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"><br>Sample Problems:<br><a href=\"https://leetcode.com/problems/n-ary-tree-preorder-traversal/description/\" target=\"_blank\" rel=\"noopener noreferrer\">N-ary Tree Preorder Traversal</a><br><a href=\"https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree/description/\" target=\"_blank\" rel=\"noopener noreferrer\">Serialize and Deserialize N-ary Tree</a> (Premium)</span>\n</li>\n<li class=\" old-record-id-JOFFdUGFkotpeRxqLAHcRifXngb\"><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"><strong>Multi-level Doubly Linked List<br></strong>A linked list where nodes can have child lists that need to be flattened.<br>Sample Problem: <a href=\"https://leetcode.com/problems/flatten-a-multilevel-doubly-linked-list/description/\" target=\"_blank\" rel=\"noopener noreferrer\">Flatten a Multilevel Doubly Linked List</a></span></li>\n<li class=\" old-record-id-JOFFdUGFkotpeRxqLAHcRifXngb\"><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"><strong>Linked List with Random Pointers<br></strong>A linked list with an additional pointer in each node that can point to any node in the list.<br>Sample Problem: <a href=\"https://leetcode.com/problems/copy-list-with-random-pointer/description/\" target=\"_blank\" rel=\"noopener noreferrer\">Copy List with Random Pointer</a><strong><br></strong></span></li>\n<li class=\" old-record-id-JOFFdUGFkotpeRxqLAHcRifXngb\"><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"><strong>Undirected Graph</strong><br>An undirected graph where each node has a value and a list of neighbor nodes.<br>Sample Problem: <a href=\"https://leetcode.com/problems/clone-graph/description/\" target=\"_blank\" rel=\"noopener noreferrer\">Clone Graph</a><br></span></li>\n</ol>\n<p> </p>\n<h2 id=\"h_01J5EH3EYH2S5PWJFRX9YFXNX9\">3.4  Handling Special Inputs</h2>\n<p>In some LeetCode problems, certain input parameters are used internally to construct types or data structures and may not be directly accessible in your code. Understanding these special inputs is crucial for properly setting up your test cases.</p>\n<p><strong>Examples: </strong></p>\n<ol>\n<li>\n<strong><a href=\"https://leetcode.com/problems/linked-list-cycle/\" target=\"_blank\" rel=\"noopener noreferrer\">Linked List Cycle</a><br></strong>A linked list that contains a cycle. The additional <code>pos</code> parameter denotes the index of the node that the tail's next pointer connects to. Only the <code>head</code> is passed into your function; <code>pos</code> is used to construct the cycle and is not accessible within your function.<strong><br></strong>\n</li>\n<li>\n<strong><a href=\"https://leetcode.com/problems/guess-number-higher-or-lower/\" target=\"_blank\" rel=\"noopener noreferrer\">Guess Number Higher or Lower</a></strong><br>A guessing game where your function tries to guess a secret number using higher or lower hints. The additional <code>pick</code> parameter is the secret number and is not accessible by your function. </li>\n<li>\n<strong><a href=\"https://leetcode.com/problems/robot-room-cleaner/\" target=\"_blank\" rel=\"noopener noreferrer\">Robot Room Cleaner</a> (Premium)</strong><strong><br></strong>A robot is controlled to clean a room with obstacles. The parameters <code>room</code>, <code>row</code> and <code>col</code> represent the room's map and the robot's initial position, respectively. You receive only a <code>robot</code> object, which you must control using its interface to clean the room. The robot's position is not directly known, and you must rely on its APIs to navigate.</li>\n<li>\n<strong><a href=\"https://leetcode.com/problems/guess-the-word/\" target=\"_blank\" rel=\"noopener noreferrer\">Guess the Word</a></strong><strong><br></strong>In this problem, you need to guess a hidden word using a series of guesses. Each guess returns the number of matching letters with the hidden word. The hidden word itself is not accessible to your function; only the response from each guess is available.</li>\n</ol>\n<p> </p>\n<h2 id=\"h_01J5EH3RXCJH4M6BB7MWJRNG6W\">3.5  Design Problem Formats</h2>\n<p><a href=\"https://leetcode.com/tag/design/\" target=\"_blank\" rel=\"noopener noreferrer\">Design problems</a> on LeetCode are unique because they often require you to implement an interface with specific constraints and requirements. These problems require a blend of algorithmic knowledge and software engineering principles.</p>\n<p>The input format for design problems consists of two parts:</p>\n<ol>\n<li>\n<strong>Function Names:</strong> A list of function names to be called on the custom class.</li>\n<li>\n<strong>Function Arguments</strong>: A list of arguments corresponding to each function call.</li>\n</ol>\n<p><strong>Example:</strong></p>\n<p>Consider the problem <a href=\"https://leetcode.com/problems/min-stack/description/\" target=\"_blank\" rel=\"noopener noreferrer\">Min Stack</a>. The input format is as follows:</p>\n<pre class=\"ace-line ace-line old-record-id-Iea6dBstpoIZgoxLC0xcjNHlnNc\">[\"MinStack\",\"push\",\"push\",\"push\",\"getMin\",\"pop\",\"top\",\"getMin\"]<br>[[],[-2],[0],[-3],[],[],[],[]]</pre>\n<p>This input corresponds to the following sequence of function calls:</p>\n<pre class=\"ace-line ace-line old-record-id-TqIJdYCcqoIKl7x7xkhcjJaNnid\">MinStack minStack = new MinStack();<br>minStack.push(-2);<br>minStack.push(0);<br>minStack.push(-3);<br>minStack.getMin(); // returns -3<br>minStack.pop();<br>minStack.top();    // returns 0<br>minStack.getMin(); // returns -2</pre>\n<p>This format helps you visualize how the class and its methods are used in the test cases.</p>\n<p> </p>\n<h2 id=\"h_01J5EGREAX3ZC9XB64VQYG7JM8\" class=\"heading-2\">3.6  Database Problem Formats</h2>\n<p>For database problems, the input format consists of the content of predefined tables. These tables are populated with data, and its input format is explained in detail <a href=\"https://support.leetcode.com/hc/en-us/articles/8000240127251-How-do-I-use-the-database-visualizer\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.</p>"},{"id":14677342930835,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/14677342930835.json","html_url":"https://support.leetcode.com/hc/en-us/articles/14677342930835-What-Are-Time-Travel-Tickets","author_id":13164412811155,"comments_disabled":false,"draft":false,"promoted":true,"position":0,"vote_sum":-17,"vote_count":103,"upvote_count":43,"downvote_count":60,"section_id":360002895793,"created_at":"2023-03-08T23:42:11Z","updated_at":"2026-10-30T03:58:00Z","name":"What Are Time Travel Tickets?","title":"What Are Time Travel Tickets?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2023-03-08T23:55:11Z","user_segment_id":null,"permission_group_id":2491634,"body":"<div data-page-id=\"ELdgdxxtwowlyQxvCUrcSf2wnVY\" data-docx-has-block-data=\"false\">\n<div class=\"ace-line ace-line old-record-id-HayQdooSSogmayx8KwEcFSb3nsr\">Sometimes you might miss the Daily Coding Challenge (DCC), Time Travel Tickets allow you to make up the missed Daily Coding Challenge. Tickets can be used to make up any missed Daily Coding Challenge within the calendar year but not for any that have passed. For example, if you missed a Daily Coding Challenge in December 2022, you can't make it up with a Time Travel Ticket as of January 1st 2023 (note: LeetCode follows UTC time).</div>\n<div class=\"ace-line ace-line old-record-id-UYKOdcqmioy6ouxWm0IcNeatnmd\"></div>\n<div class=\"ace-line ace-line old-record-id-UYKOdcqmioy6ouxWm0IcNeatnmd\"></div>\n<div class=\"ace-line ace-line old-record-id-MYGMd0mQ6oIcwixeoMgcjrbunMg\">The monthly use limit for Time Travel Tickets is 3. Each month your ticket limit resets and you'll have the ability to redeem 3 tickets on the 1st of the month. Thus, if you miss 4 Daily Coding Challenges in one month, you'll need to wait until the following month to redeem a Time Travel Ticket to recover the 4th.</div>\n<div class=\"ace-line ace-line old-record-id-MYGMd0mQ6oIcwixeoMgcjrbunMg\"></div>\n<div class=\"ace-line ace-line old-record-id-SqiMduqgcoWqOgxUtmvcn6SDnUe\"></div>\n<div class=\"ace-line ace-line old-record-id-Uo0sdQaWSoWKO6xKge5cK3EYn6e\">At this time, Time Travel Tickets don't update the max streak on the profile heat map, only the fire logo streak.</div>\n<div class=\"ace-line ace-line old-record-id-RcgGdCKqaoyCE0xe2XkcX2k6nKc\"></div>\n<div class=\"ace-line ace-line old-record-id-R6kydmmC2oKa64xg1DGcJHXsn3g\"><strong>How to use a Time Travel Ticket:</strong></div>\n</div>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/14677026250259\" alt=\"TTT.jpeg\"></p>\n<div data-page-id=\"ELdgdxxtwowlyQxvCUrcSf2wnVY\" data-docx-has-block-data=\"false\">\n<div class=\"ace-line ace-line old-record-id-OkY6dI8kIo2GEgxWQJncEi2bnog\"></div>\n<div class=\"ace-line ace-line old-record-id-OkY6dI8kIo2GEgxWQJncEi2bnog\"><strong>Will I still receive my badge for the month if I have to use a Time Travel Ticket to recover a missed DCC?</strong></div>\n<div class=\"ace-line ace-line old-record-id-XkasdaSSooSS6Qxa2rgcFTbanme\">If you use Time Travel Tickets to recover a missed Daily Coding Challenge, you will still be able to receive the badge for any months you've completed.</div>\n<div class=\"ace-line ace-line old-record-id-NweOdMiqgoukSyxi6WhctGtxnmb\"></div>\n<div class=\"ace-line ace-line old-record-id-SiegdoccEow06CxI3NacysKVnKd\"><strong>Do Time Travel Tickets update the heat map on my profile?</strong></div>\n<div class=\"ace-line ace-line old-record-id-VkgAduQC2o02maxIDyzcaWjanwe\">At this time, Time Travel Tickets don't update the max streak on the profile heat map, only the fire logo (DCC) streak.</div>\n</div>\n<p> </p>"},{"id":8000240127251,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/8000240127251.json","html_url":"https://support.leetcode.com/hc/en-us/articles/8000240127251-How-do-I-use-the-database-visualizer","author_id":5322368913555,"comments_disabled":false,"draft":false,"promoted":false,"position":0,"vote_sum":20,"vote_count":26,"upvote_count":23,"downvote_count":3,"section_id":360002895993,"created_at":"2022-07-22T06:53:54Z","updated_at":"2024-04-23T06:25:04Z","name":"How do I use the database visualizer?","title":"How do I use the database visualizer?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:33:43Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>We have provided a database visualizer tool to help you to better visualize the data in organized tables while you are writing your query. To use this tool, go to the Testcase tab on the console, and simply click within the table to edit the parts you need.</p>\n<p> </p>\n<p>See the below points to walk you through each part of the visualizer:</p>\n<ol>\n<li>The top part of the table is the column title.</li>\n<li>The \"|\" divider is used to divide the column. These are needed in order to create a new column.</li>\n<li>The \"--\" divides the header and rows. To create a new row, simply add a new line below.</li>\n<li>The spaces on the bottom part of the table are not important, and the judge does not read this space. The example is here to make the table easier to read, and contribute to the alignment.</li>\n</ol>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/8089285361171/12345.png\" alt=\"12345.png\"></p>"},{"id":7962266478227,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/7962266478227.json","html_url":"https://support.leetcode.com/hc/en-us/articles/7962266478227-How-do-I-report-a-user-for-a-contest-violation","author_id":5322368913555,"comments_disabled":true,"draft":false,"promoted":false,"position":0,"vote_sum":43,"vote_count":147,"upvote_count":95,"downvote_count":52,"section_id":360002862534,"created_at":"2022-07-21T00:06:55Z","updated_at":"2026-11-08T04:52:13Z","name":"How do I report a user for a contest violation?","title":"How do I report a user for a contest violation?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2025-08-04T03:47:00Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>LeetCode encourages <span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">all participants to contribute to maintaining the justice and fairness of our contests by reporting any violations or cheating incidents that users might come across. Every week, LeetCode's contest team reviews the violation report and takes appropriate action to ensure accurate and fair results.</span></p>\n<p> </p>\n<h4 id=\"h_01K1SJJDV3W6EZRKK22BHT8VSG\"><strong>How to Report Violating Users</strong></h4>\n<p><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">To report an incident or violation you've encountered, please follow the steps below:</span></p>\n<ol>\n<li><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">Head to the contest's ranking results page. This is found by heading to a contest's description page, and then going down to the bottom of the page to the \"Ranking\" area. Click \"More\" to view the entire ranking board.</span></li>\n<li><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">Find the user you believe to have cheated or violated contest rules on the ranking board.</span></li>\n<li><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">Once you have found the user, locate and click on the icon next to the time of the corresponding question's submission, as highlighted below. <img src=\"https://support.leetcode.com/hc/article_attachments/43533950081427\"></span></li>\n<li>\n<span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">This will display the user's submitted code for the question in a pop-up window. Click on the \"Report Cheating\" button at the bottom of the code - please see screenshot below for an example of the description box that will appear. Insert your reasoning or evidence as to why this user has violated the contest rules. Please be as thorough as possible here.</span><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"></span>\n<ul>\n<li><span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\">If you want to report multiple users cheating, please make sure to add the other username(s) in the description as well.</span></li>\n<li><img src=\"https://support.leetcode.com/hc/article_attachments/43533950081811\"></li>\n<li>\n<div style=\"white-space: pre-wrap;\" data-zone-id=\"0\" data-line-index=\"0\" data-line=\"true\">Press \"Submit\" once you are finished providing your reasoning —No reason or just a few words can not be submitted, and this will send the report to our contest team for review. Please be patient<span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"> as our team reviews all submissions.</span><img style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\" src=\"https://support.leetcode.com/hc/article_attachments/43533950081939\">\n</div>\n<span style=\"font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;\"></span>\n</li>\n</ul>\n</li>\n</ol>\n<p> </p>\n<h4 id=\"h_01K1SJJDV3DV9DV8Z46AX6D3C1\"><strong>Contest Violations </strong></h4>\n<p>For more information about specific contest violations, please visit <a href=\"https://support.leetcode.com/hc/en-us/articles/360011984933\" target=\"_self\" rel=\"undefined\">this article here.</a></p>\n<p> </p>"},{"id":1500007448202,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/1500007448202.json","html_url":"https://support.leetcode.com/hc/en-us/articles/1500007448202-Voice-Video-Help-Article","author_id":414734620734,"comments_disabled":false,"draft":false,"promoted":false,"position":0,"vote_sum":2,"vote_count":22,"upvote_count":12,"downvote_count":10,"section_id":360002895993,"created_at":"2021-04-16T06:41:20Z","updated_at":"2026-08-24T18:01:18Z","name":"Voice/Video Help Article","title":"Voice/Video Help Article","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2021-04-19T09:59:50Z","user_segment_id":null,"permission_group_id":2491634,"body":"<h2><strong>Browser Permissions</strong></h2>\n<p><span style=\"font-weight: 400;\">Please check whether the browser has permission to access the camera and microphone.</span></p>\n<p><span style=\"font-weight: 400;\">Please find the 🔒 icon shown in the figure below on the left side of the address bar of the Chrome browser. Click to check the permission to use the camera/microphone. Please click “Allow” and refresh the browser.</span></p>\n<p><span style=\"font-weight: 400;\"><img src=\"https://support.leetcode.com/hc/article_attachments/1500010365442/Screen_Shot_2021-04-16_at_2.30.42_PM.png\" alt=\"Screen_Shot_2021-04-16_at_2.30.42_PM.png\" width=\"392\" height=\"347\"></span></p>\n<h2> </h2>\n<h2><strong>System Permissions </strong></h2>\n<p><span style=\"font-weight: 400;\">Please check whether the system has permission to use the camera/microphone. <strong>Please refresh your browser after modifying your settings as prompted below.</strong> </span></p>\n<h3><strong>Mac</strong></h3>\n<p><span style=\"font-weight: 400;\">Choose Apple menu &gt; </span><strong>System Preferences</strong><span style=\"font-weight: 400;\">, click Security &amp; Privacy, then click Privacy. Select </span><strong>Camera</strong><span style=\"font-weight: 400;\">. Select the checkbox next to the Chrome browser to allow it to access your </span><strong>camera</strong><span style=\"font-weight: 400;\">.</span></p>\n<p><span style=\"font-weight: 400;\"><img src=\"https://support.leetcode.com/hc/article_attachments/1500010653481/Screen_Shot_2021-04-16_at_2.35.34_PM.png\" alt=\"Screen_Shot_2021-04-16_at_2.35.34_PM.png\" width=\"274\" height=\"253\"></span></p>\n<p><span style=\"font-weight: 400;\"><img src=\"https://support.leetcode.com/hc/article_attachments/1500010365502/Screen_Shot_2021-04-16_at_2.35.51_PM.png\" alt=\"Screen_Shot_2021-04-16_at_2.35.51_PM.png\" width=\"427\" height=\"366\"></span></p>\n<p><span style=\"font-weight: 400;\"><img src=\"https://support.leetcode.com/hc/article_attachments/1500010365522/Screen_Shot_2021-04-16_at_2.36.14_PM.png\" alt=\"Screen_Shot_2021-04-16_at_2.36.14_PM.png\" width=\"427\" height=\"366\"></span></p>\n<p> </p>\n<h3><strong>Windows</strong></h3>\n<p><span style=\"font-weight: 400;\">On the </span><strong>windows setting</strong><span style=\"font-weight: 400;\">, (1) select Privacy (2) then </span><strong>Camera and Microphone</strong><span style=\"font-weight: 400;\">. (3) In Allow </span><strong>access</strong><span style=\"font-weight: 400;\"> to the </span><strong>camera</strong> <strong>and microphone </strong><span style=\"font-weight: 400;\">on this device, select </span><strong>Change</strong><span style=\"font-weight: 400;\"> and make sure </span><strong>Camera access</strong><span style=\"font-weight: 400;\"> for this device is turned on.</span></p>\n<p><span style=\"font-weight: 400;\"><img src=\"https://support.leetcode.com/hc/article_attachments/1500010365722/camera-privacy-settings-windows-10-1803.jpeg\" alt=\"camera-privacy-settings-windows-10-1803.jpeg\" width=\"518\" height=\"376\"></span></p>"},{"id":360013897133,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360013897133.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360013897133-I-am-unable-to-verify-my-email-Help","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":true,"position":0,"vote_sum":-91,"vote_count":163,"upvote_count":36,"downvote_count":127,"section_id":360002895793,"created_at":"2018-12-14T01:45:41Z","updated_at":"2026-10-22T20:16:18Z","name":"I am unable to verify my email. Help?","title":"I am unable to verify my email. Help?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:57:22Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Upon creating a LeetCode account, you will be sent a verification email. Usually, the verification emails are automatically sent and should arrive almost immediately in your inbox. Here are a few simple but helpful tips if you cannot find your verification email.</p>\n<p><strong>1. Wait for a few minutes</strong></p>\n<p>Our verification emails are automatically triggered, but it's always possible that the email may experience a delay, so please wait for a short while.</p>\n<p><strong>2. Search for the email in your inbox</strong></p>\n<p>Search for the email from LeetCode in your inbox and check if it's in the Spam folder.</p>\n<p><strong>3. Check the email address on file</strong></p>\n<p>It's possible that you used a different email address or perhaps there was a typo in the email when you signed up. To check which email address you have associated with your account, please go to your <a href=\"https://leetcode.com/profile/account/\" target=\"_blank\" rel=\"noopener\">account settings page</a>.</p>\n<p>If the address is correct, please try to resend the verification email. If your email address is incorrect, please <a href=\"https://support.leetcode.com/hc/en-us/articles/360011985513-How-do-I-change-my-primary-email-for-my-account-\" target=\"_blank\" rel=\"noopener\">change your primary email</a> on the profile page.</p>"},{"id":360012067053,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360012067053.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360012067053-LeetCode-QuickStart-Guide","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":0,"vote_sum":111,"vote_count":229,"upvote_count":170,"downvote_count":59,"section_id":360002516153,"created_at":"2018-11-13T01:27:07Z","updated_at":"2026-09-26T18:09:33Z","name":"LeetCode QuickStart Guide","title":"LeetCode QuickStart Guide","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:35:26Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>With a vast amount of technical resources and over 2000 authentic company interview questions, LeetCode is the leading professional online tech platform to help you enhance your skills, expand your knowledge and prepare for technical interviews.</p>\n<p>Looking to get started on LeetCode? Check out the features available to get you started:</p>\n<p> </p>\n<h2>1) <strong>Explore</strong>\n</h2>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/4409917888403/mceclip0.png\" alt=\"mceclip0.png\"></p>\n<p> </p>\n<p><span style=\"font-weight: 400;\">The <a href=\"https://leetcode.com/explore/\" target=\"_self\">Explore page</a> is a great way to brush up on your knowledge or prepare for interviews. </span><span style=\"font-weight: 400;\">We have two main categories in the explore section. \"Learn\" and \"Interview\". \"Learn\" cards provide details on specific topics. \"Interview\" cards provide a structural approach with top interview questions that were asked by specific companies.</span></p>\n<p> </p>\n<p> </p>\n<p> </p>\n<h2>2) <strong>Problems</strong>\n</h2>\n<p><strong><img src=\"https://support.leetcode.com/hc/article_attachments/4409909829907/mceclip1.png\" alt=\"mceclip1.png\"></strong></p>\n<p> </p>\n<p><span style=\"font-weight: 400;\">Looking to work on problems for an upcoming interview? to update or refresh your knowledge? Specific problems in coding? Specific questions that have been asked by a company? The problem page is your go to page! Here you can find all the problems within LeetCode that have been carefully curated and tested by our awesome team. The problem page can be found,</span><a href=\"https://leetcode.com/problemset/all/\"> <span style=\"font-weight: 400;\">here</span></a><span style=\"font-weight: 400;\">.</span></p>\n<p> </p>\n<p> </p>\n<h2>4) <strong>Contests</strong>\n</h2>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/4409918031251/mceclip2.png\" alt=\"mceclip2.png\"></p>\n<p> </p>\n<p><span style=\"font-weight: 400;\">Interested in a little friendly competition with other LeetCoders? Wanting to see if your interview ready? Check out the Contest page,</span><a href=\"https://leetcode.com/contest/\"> <span style=\"font-weight: 400;\">here</span></a><span style=\"font-weight: 400;\">. </span><span style=\"font-weight: 400;\">Contest questions were curated by the LeetCode content team and the questions are asked in real interviews. Improve your skills by constantly participating in our weekly and/or bi-weekly contests and track your growth with the contest rating. When you’re able to solve the contest problems, you’re ready to ace an interview!</span></p>\n<p> </p>\n<p> </p>\n<h2>5) <strong>Discuss</strong>\n</h2>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/4409902780435/mceclip3.png\" alt=\"mceclip3.png\"></p>\n<p>Want to connect with the LeetCode community and have general discussions with other LeetCoders? The Discuss section is your place! <a href=\"https://leetcode.com/discuss/\" target=\"_blank\" rel=\"noopener\">Here</a> you can also find and contribute, Interview Questions, Interview Experience, Career Information, Study Plan information, and submit any support help or feedback.</p>\n<p> </p>\n<p>You can also use the Discuss section for specific problems! If you need any help with our own solution or want to understand or get a better understanding of someone else's solution, you can find that in each problem's Discuss section! Whenever you are viewing a problem in LeetCode, you can click on the Discuss tab to go over to the Discuss section for the specific problem.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/4409909985555/mceclip4.png\" alt=\"mceclip4.png\"></p>\n<p> </p>\n<p> </p>\n<p> </p>\n<p> </p>\n<p> </p>\n<p>Enjoying your time on LeetCode or looking to level up your experience? <a href=\"https://leetcode.com/subscribe/?ref=sto_npl\" target=\"_blank\" rel=\"noopener\">Sign up</a> for <strong>LeetCode Premium</strong> today to get access to all our <strong>Premium</strong> features!</p>\n<p>The Perks of Premium:</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/4409902801939/mceclip5.png\" alt=\"mceclip5.png\"></p>\n<p> </p>\n<p> </p>"},{"id":360011985213,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011985213.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011985213-Why-I-still-can-t-access-the-exclusive-problems-after-payment","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":0,"vote_sum":-200,"vote_count":220,"upvote_count":10,"downvote_count":210,"section_id":360002895913,"created_at":"2018-11-10T00:40:16Z","updated_at":"2026-10-30T06:08:44Z","name":"Why I still can't access the exclusive problems after payment?","title":"Why I still can't access the exclusive problems after payment?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:56:56Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>First, please access <a href=\"https://leetcode.com/subscription/\" target=\"_blank\" rel=\"noopener\">My Subscription</a> page to confirm your subscription is currently active. Check your <a href=\"https://leetcode.com/subscription/history/\" target=\"_blank\" rel=\"noopener\">billing history</a> to make sure the transaction went through. If the new transaction does not appear in your billing history, your payment was probably declined. Please try to subscribe again using another debit/credit card or contact your bank to ask for more information regarding this issue. If all fails, <a href=\"https://support.leetcode.com/hc/en-us/articles/360012304093-What-payment-methods-do-you-accept-\">we do accept PayPal.</a></p>\n<p class=\"p1\"><span class=\"s1\">If the transaction went through and your current subscription is active, there might be a delay in activating your subscription. You should have access to all the premium features after a short wait, usually within 15 minutes.</span></p>"},{"id":360011884094,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011884094.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011884094-What-will-I-get-with-a-premium-subscription","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":0,"vote_sum":-98,"vote_count":178,"upvote_count":40,"downvote_count":138,"section_id":360002895973,"created_at":"2018-11-10T00:27:28Z","updated_at":"2026-11-03T08:01:08Z","name":"What will I get with a premium subscription?","title":"What will I get with a premium subscription?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T07:29:15Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>In addition to the free questions and articles with detailed solutions to questions, with a LeetCode Premium subscription you will have access to exclusive premium questions/articles as well. You will also be able to sort questions by company, access premium exclusive content in Explore and practice mock interviews targeting a specific company. A Premium subscription will also let you enjoy priority judging. </p>"},{"id":360011883794,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011883794.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011883794-Do-I-need-to-register-for-the-contest","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":0,"vote_sum":153,"vote_count":243,"upvote_count":198,"downvote_count":45,"section_id":360002862534,"created_at":"2018-11-10T00:04:50Z","updated_at":"2026-10-25T14:51:54Z","name":"Do I need to register for the contest?","title":"Do I need to register for the contest?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T23:01:31Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Yes, in order to participate in a contest you do need to register for the contest with a LeetCode account.</p>\n<p>If you have not registered a LeetCode account yet, please <a href=\"https://leetcode.com/accounts/signup/\" target=\"_blank\" rel=\"noopener\">sign up for free</a>. Before the contest begins, make sure your <a href=\"https://support.leetcode.com/hc/en-us/articles/360013897133-I-am-unable-to-verify-my-account-Help-\">account's email is verified</a>.</p>"},{"id":360011934853,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011934853.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011934853-Why-all-my-solutions-in-the-code-editor-suddenly-went-missing","author_id":368453300473,"comments_disabled":false,"draft":false,"promoted":true,"position":0,"vote_sum":81,"vote_count":231,"upvote_count":156,"downvote_count":75,"section_id":360002895993,"created_at":"2018-11-09T02:15:36Z","updated_at":"2026-10-11T08:28:11Z","name":"Why all my solutions in the code editor suddenly went missing?","title":"Why all my solutions in the code editor suddenly went missing?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:59:13Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>This usually happens after you've switched to a different browser or computer, recently cleared the browser's history and cache, or restored to the browser's default settings. This may also happen after you login to a different account.</p>\n<p>Please note that the code you typed into the code editor is stored <strong><em>temporarily</em></strong> in your <a href=\"https://en.wikipedia.org/wiki/Web_storage#Local_and_session_storage\" target=\"_blank\" rel=\"noopener\">local storage</a>, however, all your submitted solutions are stored <strong><em>permanently</em></strong>.</p>\n<p>By clicking on the \"code\" icon <img src=\"https://support.leetcode.com/hc/article_attachments/360021717993/image__4_.png\" alt=\"image__4_.png\" width=\"17\" height=\"17\"> on the editor toolbar above the code editor, you can retrieve your <em>last</em> submitted code.</p>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.leetcode.com/hc/article_attachments/360020802774/Screen_Shot_2018-12-26_at_3.30.00_PM.png\" alt=\"Screen_Shot_2018-12-26_at_3.30.00_PM.png\" width=\"242\" height=\"77\"></p>\n<p>Still having trouble finding your code? Check the <a href=\"https://leetcode.com/session/\" target=\"_blank\" rel=\"noopener\">session management</a> page, make sure you have selected the correct session so you can retrieve the submissions that are associated with that session.</p>"},{"id":360013578114,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360013578114.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360013578114-How-to-use-Explore","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":10,"vote_count":20,"upvote_count":15,"downvote_count":5,"section_id":360002516173,"created_at":"2018-12-13T02:52:30Z","updated_at":"2022-11-17T22:51:03Z","name":"How to use Explore","title":"How to use Explore","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:51:03Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Choose a suitable card to start learning. Our card covers topics from data structure, algorithm, curated list of company interview questions, and behavior question tips.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360019951734/Screen_Shot_2018-12-13_at_3.39.37_PM.png\" alt=\"Screen_Shot_2018-12-13_at_3.39.37_PM.png\"></p>\n<p>When you open an Explore card, you can clearly see the structure of the topic. By default, we will take you to the overview page automatically. The overview page introduces the Explore topic and the catalog of the card. With the catalog, you can switch between chapters and control the learning process easily.</p>\n<p>Below is an example of our Explore interface.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360019954474/Screen_Shot_2018-12-13_at_4.22.59_PM.png\" alt=\"Screen_Shot_2018-12-13_at_4.22.59_PM.png\"></p>\n<p><strong>Content Navigator:</strong> The Content Navigator on the left shows you the structure of the card. Whenever you finish reading an article or complete a question, the checkbox will automatically be checked to indicate the completion status. You can also click the checkbox to undo the status and mark the corresponding item as incomplete.</p>\n<p><strong>Content Area:</strong> This area will display the corresponding content according to your selection, it could be either an article, a video or a question, etc.</p>"},{"id":360012016874,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360012016874.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360012016874-Start-your-Coding-Practice","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":249,"vote_count":363,"upvote_count":306,"downvote_count":57,"section_id":360002516153,"created_at":"2018-11-14T00:32:49Z","updated_at":"2026-08-22T13:07:42Z","name":"Start your Coding Practice","title":"Start your Coding Practice","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:50:31Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Below is our question detail page. It includes several useful sections, which can meet all your programming requirements whether you are a newbie or a professional. Read on to learn more about how to use each of the sections for your coding practice.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360019741914/Screen_Shot_2018-12-11_at_4.57.14_PM.png\" alt=\"Screen_Shot_2018-12-11_at_4.57.14_PM.png\" width=\"716\" height=\"378\"> </p>\n<h3>Question Content</h3>\n<p>In this section, the first thing you see is the question title, and right below it you can find some interactive features such as like/dislike voting, collection, and sharing. Below the question description, we provide information on the total number of accepted submissions v.s. the total number of submissions, so that you can get a more realistic idea about the difficulty of your selected question.</p>\n<p>In addition, you can switch between the tabs that are located above the question title to use more features.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360020651953/Screen_Shot_2018-12-11_at_4.28.23_PM.png\" alt=\"Screen_Shot_2018-12-11_at_4.28.23_PM.png\" width=\"567\" height=\"41\"></p>\n<p>The tabs include the question's Description, Solution, Submissions and Discuss. Proactively submitting excellent answers and engaging in discussions will help you improve your coding ability and gain reputation in our community.</p>\n<p> </p>\n<h3>Question Picker</h3>\n<p>The question picker section lets you pick a random question to work on and track your progress in your selected subset of questions.</p>\n<p>More importantly, you can search and filter our database of questions or switch between your custom lists of questions through the question picker.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360020653013/Screen_Shot_2018-12-11_at_4.54.00_PM.png\" alt=\"Screen_Shot_2018-12-11_at_4.54.00_PM.png\" width=\"1192\" height=\"582\"></p>\n<p> </p>\n<h3>Code Editor</h3>\n<p>LeetCode is working on providing the best online coding experience for you. In the code editor, we start you off with default code templates based on the question and your choice of language. In order to achieve these unique features, our team integrates the editor with different context and coding environments. Many thanks to the <a href=\"https://codemirror.net\">CodeMirror</a> Team for helping us make this possible.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360019745134/Screen_Shot_2018-12-11_at_6.16.05_PM.png\" alt=\"Screen_Shot_2018-12-11_at_6.16.05_PM.png\" width=\"802\" height=\"244\"></p>\n<p><strong>Language Information：</strong>Shows environments for the currently supported programming languages of online judger.</p>\n<p><strong>Language Dropdown：</strong>Select the language you want to use and the editor will automatically adjust the corresponding code template. Currently, we have pretty good support for the following languages: C++, Java, Python, C, C#, JavaScript, Ruby, Swift, Go, Scala, Kotlin, Rust, MySQL, Bash.</p>\n<p><strong>Editor Shortcuts：</strong>We support most common shortcuts, and we also support some special shortcuts for you to execute the code. You can click on the button to see the available editor shortcuts.</p>\n<p><strong>Retrieve Last Submitted Code：</strong>After clicking this button, the editor will extract the last submitted code for you into your editor.</p>\n<p><strong>Reset to Default Code Definition：</strong>Clicking this button will reset the entire editor to the original code template.</p>\n<p><strong>Playground：</strong>Use our Playground tool to debug your code. After using this feature, the driver code associated with the current question will also appear in the newly created Playground.</p>\n<p><strong>Editor Settings：</strong>You can set the font, theme, key bindings, and tab size inside the editor settings.</p>\n<p><strong>Full Screen：</strong>Expanding code editor area to full screen will give you more programming space. </p>\n<h3> </h3>\n<h3>Testing Tools</h3>\n<p>When you need to test your code, you can run it by clicking on the \"Run Code\" button. Once the code is executed, the console will automatically expand and display the output based on the default test case.</p>\n<p><strong>Testcase:</strong> In the console, in addition to previewing the execution results of your code, you can modify and make your own test cases. Just click on the \"Testcase\" tab, modify or enter your test case in the input box, and click \"Run Code\". </p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360019746734/Screen_Shot_2018-12-11_at_6.36.49_PM.png\" alt=\"Screen_Shot_2018-12-11_at_6.36.49_PM.png\"></p>\n<p><strong>Run Code Result:</strong> \"Run Code\" feature is provided to help you debug your code. After clicking \"Run Code\", the system will execute your code and output the result based on the current test case. When execution of your code is completed, the system will generate information on input &amp; output, for example, input, your output, and expected output. If your code has a compile error or other errors, they will also appear in the \"Run Code Result\" panel.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360020657813/Screen_Shot_2018-12-11_at_6.56.42_PM.png\" alt=\"Screen_Shot_2018-12-11_at_6.56.42_PM.png\" width=\"1008\" height=\"207\"></p>\n<p><strong>Submit:</strong> When after testing your code you decide to submit your code for judging, click on the \"Submit\" button. Once submitted, your code will be analyzed in a more systematic way through our online judging system. Your code will be evaluated against hundreds of thousands of test cases on the backend to ensure it meets various time and space restrictions and passes corner cases. When the judgment is completed, the system will automatically display the results in the \"Submissions\" tab.</p>\n<p><strong><span class=\"wysiwyg-underline\">Note</span>:</strong> Each submission will be recorded in your submission history, and excessive submissions may affect your acceptance rate. Therefore, please carefully check and debug your code before submitting. Please do not use \"Submit\" too frequently so as not to affect your LeetCode ranking which is displayed on your public profile.</p>\n<p> </p>"},{"id":360011985513,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011985513.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011985513-How-do-I-change-my-primary-email-for-my-account","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":-46,"vote_count":102,"upvote_count":28,"downvote_count":74,"section_id":360002895793,"created_at":"2018-11-10T00:58:13Z","updated_at":"2026-09-20T16:52:18Z","name":"How do I change my primary email for my account? ","title":"How do I change my primary email for my account? ","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T07:15:03Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>You can change your primary email address in the 'Account Information' section of your <a href=\"https://leetcode.com/profile/account/\" target=\"_blank\" rel=\"noopener\">Profile page</a>. Click on 'Account' -&gt; 'Email' -&gt; 'Edit'. </p>"},{"id":360011884354,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011884354.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011884354-What-are-the-premium-questions","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":-2,"vote_count":20,"upvote_count":9,"downvote_count":11,"section_id":360002895973,"created_at":"2018-11-10T00:41:41Z","updated_at":"2024-02-23T16:14:56Z","name":"What are the premium questions? ","title":"What are the premium questions? ","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T01:25:25Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p class=\"pad\">Here is the current up to date premium question list, stay tuned for more...</p>\n<ol>\n<li><a href=\"https://leetcode.com/problems/robot-room-cleaner/\">Robot Room Cleaner</a></li>\n<li><a href=\"https://leetcode.com/problems/insert-into-a-cyclic-sorted-list/\">Insert into a Cyclic Sorted List</a></li>\n<li><a href=\"https://leetcode.com/problems/similar-rgb-color/\">Similar RGB Color</a></li>\n<li><a href=\"https://leetcode.com/problems/split-bst/\">Split BST</a></li>\n<li><a href=\"https://leetcode.com/problems/minimize-max-distance-to-gas-station/\">Minimize Max Distance to Gas Station</a></li>\n<li><a href=\"https://leetcode.com/problems/search-in-a-sorted-array-of-unknown-size/\">Search in a Sorted Array of Unknown Size</a></li>\n<li><a href=\"https://leetcode.com/problems/basic-calculator-iii/\">Basic Calculator III</a></li>\n<li><a href=\"https://leetcode.com/problems/encode-n-ary-tree-to-binary-tree/\">Encode N-ary Tree to Binary Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/serialize-and-deserialize-n-ary-tree/\">Serialize and Deserialize N-ary Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/find-anagram-mappings/\">Find Anagram Mappings</a></li>\n<li><a href=\"https://leetcode.com/problems/employee-free-time/\">Employee Free Time</a></li>\n<li><a href=\"https://leetcode.com/problems/bold-words-in-string/\">Bold Words in String</a></li>\n<li><a href=\"https://leetcode.com/problems/convert-binary-search-tree-to-sorted-doubly-linked-list/\">Convert Binary Search Tree to Sorted Doubly Linked List</a></li>\n<li><a href=\"https://leetcode.com/problems/pour-water/\">Pour Water</a></li>\n<li><a href=\"https://leetcode.com/problems/ip-to-cidr/\">IP to CIDR</a></li>\n<li><a href=\"https://leetcode.com/problems/number-of-corner-rectangles/\">Number Of Corner Rectangles</a></li>\n<li><a href=\"https://leetcode.com/problems/closest-leaf-in-a-binary-tree/\">Closest Leaf in a Binary Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/sentence-similarity-ii/\">Sentence Similarity II</a></li>\n<li><a href=\"https://leetcode.com/problems/sentence-similarity/\">Sentence Similarity</a></li>\n<li><a href=\"https://leetcode.com/problems/minimum-window-subsequence/\">Minimum Window Subsequence</a></li>\n<li><a href=\"https://leetcode.com/problems/max-stack/\">Max Stack</a></li>\n<li><a href=\"https://leetcode.com/problems/candy-crush/\">Candy Crush</a></li>\n<li><a href=\"https://leetcode.com/problems/number-of-distinct-islands-ii/\">Number of Distinct Islands II</a></li>\n<li><a href=\"https://leetcode.com/problems/number-of-distinct-islands/\">Number of Distinct Islands</a></li>\n<li><a href=\"https://leetcode.com/problems/next-closest-time/\">Next Closest Time</a></li>\n<li><a href=\"https://leetcode.com/problems/k-empty-slots/\">K Empty Slots</a></li>\n<li><a href=\"https://leetcode.com/problems/path-sum-iv/\">Path Sum IV</a></li>\n<li><a href=\"https://leetcode.com/problems/equal-tree-partition/\">Equal Tree Partition</a></li>\n<li><a href=\"https://leetcode.com/problems/remove-9/\">Remove 9</a></li>\n<li><a href=\"https://leetcode.com/problems/coin-path/\">Coin Path</a></li>\n<li><a href=\"https://leetcode.com/problems/4-keys-keyboard/\">4 Keys Keyboard</a></li>\n<li><a href=\"https://leetcode.com/problems/design-search-autocomplete-system/\">Design Search Autocomplete System</a></li>\n<li><a href=\"https://leetcode.com/problems/maximum-average-subarray-ii/\">Maximum Average Subarray II</a></li>\n<li><a href=\"https://leetcode.com/problems/find-the-derangement-of-an-array/\">Find the Derangement of An Array</a></li>\n<li><a href=\"https://leetcode.com/problems/design-log-storage-system/\">Design Log Storage System</a></li>\n<li><a href=\"https://leetcode.com/problems/design-excel-sum-formula/\">Design Excel Sum Formula</a></li>\n<li><a href=\"https://leetcode.com/problems/maximum-distance-in-arrays/\">Maximum Distance in Arrays</a></li>\n<li><a href=\"https://leetcode.com/problems/minimum-factorization/\">Minimum Factorization</a></li>\n<li><a href=\"https://leetcode.com/problems/add-bold-tag-in-string/\">Add Bold Tag in String</a></li>\n<li><a href=\"https://leetcode.com/problems/design-compressed-string-iterator/\">Design Compressed String Iterator</a></li>\n<li><a href=\"https://leetcode.com/problems/biggest-single-number/\">Biggest Single Number</a></li>\n<li><a href=\"https://leetcode.com/problems/students-report-by-geography/\">Students Report By Geography</a></li>\n<li><a href=\"https://leetcode.com/problems/average-salary-departments-vs-company/\">Average Salary: Departments VS Company</a></li>\n<li><a href=\"https://leetcode.com/problems/second-degree-follower/\">Second Degree Follower</a></li>\n<li><a href=\"https://leetcode.com/problems/shortest-distance-in-a-line/\">Shortest Distance in a Line</a></li>\n<li><a href=\"https://leetcode.com/problems/shortest-distance-in-a-plane/\">Shortest Distance in a Plane</a></li>\n<li><a href=\"https://leetcode.com/problems/triangle-judgement/\">Triangle Judgement</a></li>\n<li><a href=\"https://leetcode.com/problems/tree-node/\">Tree Node</a></li>\n<li><a href=\"https://leetcode.com/problems/sales-person/\">Sales Person</a></li>\n<li><a href=\"https://leetcode.com/problems/consecutive-available-seats/\">Consecutive Available Seats</a></li>\n<li><a href=\"https://leetcode.com/problems/friend-requests-ii-who-has-the-most-friends/\">Friend Requests II: Who Has the Most Friends</a></li>\n<li><a href=\"https://leetcode.com/problems/design-in-memory-file-system/\">Design In-Memory File System</a></li>\n<li><a href=\"https://leetcode.com/problems/friend-requests-i-overall-acceptance-rate/\">Friend Requests I: Overall Acceptance Rate</a></li>\n<li><a href=\"https://leetcode.com/problems/kill-process/\">Kill Process</a></li>\n<li><a href=\"https://leetcode.com/problems/customer-placing-the-largest-number-of-orders/\">Customer Placing the Largest Number of Orders</a></li>\n<li><a href=\"https://leetcode.com/problems/investments-in-2016/\">Investments in 2016</a></li>\n<li><a href=\"https://leetcode.com/problems/find-customer-referee/\">Find Customer Referee</a></li>\n<li><a href=\"https://leetcode.com/problems/count-student-number-in-departments/\">Count Student Number in Departments</a></li>\n<li><a href=\"https://leetcode.com/problems/find-cumulative-salary-of-an-employee/\">Find Cumulative Salary of an Employee</a></li>\n<li><a href=\"https://leetcode.com/problems/get-highest-answer-rate-question/\">Get Highest Answer Rate Question</a></li>\n<li><a href=\"https://leetcode.com/problems/squirrel-simulation/\">Squirrel Simulation</a></li>\n<li><a href=\"https://leetcode.com/problems/employee-bonus/\">Employee Bonus</a></li>\n<li><a href=\"https://leetcode.com/problems/winning-candidate/\">Winning Candidate</a></li>\n<li><a href=\"https://leetcode.com/problems/maximum-vacation-days/\">Maximum Vacation Days</a></li>\n<li><a href=\"https://leetcode.com/problems/find-median-given-frequency-of-numbers/\">Find Median Given Frequency of Numbers</a></li>\n<li><a href=\"https://leetcode.com/problems/managers-with-at-least-5-direct-reports/\">Managers with at Least 5 Direct Reports</a></li>\n<li><a href=\"https://leetcode.com/problems/median-employee-salary/\">Median Employee Salary</a></li>\n<li><a href=\"https://leetcode.com/problems/longest-line-of-consecutive-one-in-matrix/\">Longest Line of Consecutive One in Matrix</a></li>\n<li><a href=\"https://leetcode.com/problems/split-concatenated-strings/\">Split Concatenated Strings</a></li>\n<li><a href=\"https://leetcode.com/problems/binary-tree-longest-consecutive-sequence-ii/\">Binary Tree Longest Consecutive Sequence II</a></li>\n<li><a href=\"https://leetcode.com/problems/split-array-with-equal-sum/\">Split Array with Equal Sum</a></li>\n<li><a href=\"https://leetcode.com/problems/boundary-of-binary-tree/\">Boundary of Binary Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/output-contest-matches/\">Output Contest Matches</a></li>\n<li><a href=\"https://leetcode.com/problems/construct-binary-tree-from-string/\">Construct Binary Tree from String</a></li>\n<li><a href=\"https://leetcode.com/problems/lonely-pixel-ii/\">Lonely Pixel II</a></li>\n<li><a href=\"https://leetcode.com/problems/lonely-pixel-i/\">Lonely Pixel I</a></li>\n<li><a href=\"https://leetcode.com/problems/word-abbreviation/\">Word Abbreviation</a></li>\n<li><a href=\"https://leetcode.com/problems/the-maze-ii/\">The Maze II</a></li>\n<li><a href=\"https://leetcode.com/problems/the-maze-iii/\">The Maze III</a></li>\n<li><a href=\"https://leetcode.com/problems/the-maze/\">The Maze</a></li>\n<li><a href=\"https://leetcode.com/problems/max-consecutive-ones-ii/\">Max Consecutive Ones II</a></li>\n<li><a href=\"https://leetcode.com/problems/find-permutation/\">Find Permutation</a></li>\n<li><a href=\"https://leetcode.com/problems/encode-string-with-shortest-length/\">Encode String with Shortest Length</a></li>\n<li><a href=\"https://leetcode.com/problems/convex-polygon/\">Convex Polygon</a></li>\n<li><a href=\"https://leetcode.com/problems/optimal-account-balancing/\">Optimal Account Balancing</a></li>\n<li><a href=\"https://leetcode.com/problems/sequence-reconstruction/\">Sequence Reconstruction</a></li>\n<li><a href=\"https://leetcode.com/problems/ternary-expression-parser/\">Ternary Expression Parser</a></li>\n<li><a href=\"https://leetcode.com/problems/word-squares/\">Word Squares</a></li>\n<li><a href=\"https://leetcode.com/problems/valid-word-square/\">Valid Word Square</a></li>\n<li><a href=\"https://leetcode.com/problems/sentence-screen-fitting/\">Sentence Screen Fitting</a></li>\n<li><a href=\"https://leetcode.com/problems/minimum-unique-word-abbreviation/\">Minimum Unique Word Abbreviation</a></li>\n<li><a href=\"https://leetcode.com/problems/valid-word-abbreviation/\">Valid Word Abbreviation</a></li>\n<li><a href=\"https://leetcode.com/problems/design-phone-directory/\">Design Phone Directory</a></li>\n<li><a href=\"https://leetcode.com/problems/range-addition/\">Range Addition</a></li>\n<li><a href=\"https://leetcode.com/problems/plus-one-linked-list/\">Plus One Linked List</a></li>\n<li><a href=\"https://leetcode.com/problems/find-leaves-of-binary-tree/\">Find Leaves of Binary Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/nested-list-weight-sum-ii/\">Nested List Weight Sum II</a></li>\n<li><a href=\"https://leetcode.com/problems/design-hit-counter/\">Design Hit Counter</a></li>\n<li><a href=\"https://leetcode.com/problems/bomb-enemy/\">Bomb Enemy</a></li>\n<li><a href=\"https://leetcode.com/problems/sort-transformed-array/\">Sort Transformed Array</a></li>\n<li><a href=\"https://leetcode.com/problems/logger-rate-limiter/\">Logger Rate Limiter</a></li>\n<li><a href=\"https://leetcode.com/problems/rearrange-string-k-distance-apart/\">Rearrange String k Distance Apart</a></li>\n<li><a href=\"https://leetcode.com/problems/line-reflection/\">Line Reflection</a></li>\n<li><a href=\"https://leetcode.com/problems/design-snake-game/\">Design Snake Game</a></li>\n<li><a href=\"https://leetcode.com/problems/android-unlock-patterns/\">Android Unlock Patterns</a></li>\n<li><a href=\"https://leetcode.com/problems/design-tic-tac-toe/\">Design Tic-Tac-Toe</a></li>\n<li><a href=\"https://leetcode.com/problems/moving-average-from-data-stream/\">Moving Average from Data Stream</a></li>\n<li><a href=\"https://leetcode.com/problems/longest-substring-with-at-most-k-distinct-characters/\">Longest Substring with At Most K Distinct Characters</a></li>\n<li><a href=\"https://leetcode.com/problems/nested-list-weight-sum/\">Nested List Weight Sum</a></li>\n<li><a href=\"https://leetcode.com/problems/largest-bst-subtree/\">Largest BST Subtree</a></li>\n<li><a href=\"https://leetcode.com/problems/maximum-size-subarray-sum-equals-k/\">Maximum Size Subarray Sum Equals k</a></li>\n<li><a href=\"https://leetcode.com/problems/number-of-connected-components-in-an-undirected-graph/\">Number of Connected Components in an Undirected Graph</a></li>\n<li><a href=\"https://leetcode.com/problems/generalized-abbreviation/\">Generalized Abbreviation</a></li>\n<li><a href=\"https://leetcode.com/problems/shortest-distance-from-all-buildings/\">Shortest Distance from All Buildings</a></li>\n<li><a href=\"https://leetcode.com/problems/binary-tree-vertical-order-traversal/\">Binary Tree Vertical Order Traversal</a></li>\n<li><a href=\"https://leetcode.com/problems/sparse-matrix-multiplication/\">Sparse Matrix Multiplication</a></li>\n<li><a href=\"https://leetcode.com/problems/range-sum-query-2d-mutable/\">Range Sum Query 2D - Mutable</a></li>\n<li><a href=\"https://leetcode.com/problems/number-of-islands-ii/\">Number of Islands II</a></li>\n<li><a href=\"https://leetcode.com/problems/smallest-rectangle-enclosing-black-pixels/\">Smallest Rectangle Enclosing Black Pixels</a></li>\n<li><a href=\"https://leetcode.com/problems/binary-tree-longest-consecutive-sequence/\">Binary Tree Longest Consecutive Sequence</a></li>\n<li><a href=\"https://leetcode.com/problems/best-meeting-point/\">Best Meeting Point</a></li>\n<li><a href=\"https://leetcode.com/problems/flip-game-ii/\">Flip Game II</a></li>\n<li><a href=\"https://leetcode.com/problems/flip-game/\">Flip Game</a></li>\n<li><a href=\"https://leetcode.com/problems/word-pattern-ii/\">Word Pattern II</a></li>\n<li><a href=\"https://leetcode.com/problems/unique-word-abbreviation/\">Unique Word Abbreviation</a></li>\n<li><a href=\"https://leetcode.com/problems/walls-and-gates/\">Walls and Gates</a></li>\n<li><a href=\"https://leetcode.com/problems/inorder-successor-in-bst/\">Inorder Successor in BST</a></li>\n<li><a href=\"https://leetcode.com/problems/zigzag-iterator/\">Zigzag Iterator</a></li>\n<li><a href=\"https://leetcode.com/problems/wiggle-sort/\">Wiggle Sort</a></li>\n<li><a href=\"https://leetcode.com/problems/find-the-celebrity/\">Find the Celebrity</a></li>\n<li><a href=\"https://leetcode.com/problems/paint-fence/\">Paint Fence</a></li>\n<li><a href=\"https://leetcode.com/problems/closest-binary-search-tree-value-ii/\">Closest Binary Search Tree Value II</a></li>\n<li><a href=\"https://leetcode.com/problems/encode-and-decode-strings/\">Encode and Decode Strings</a></li>\n<li><a href=\"https://leetcode.com/problems/closest-binary-search-tree-value/\">Closest Binary Search Tree Value</a></li>\n<li><a href=\"https://leetcode.com/problems/alien-dictionary/\">Alien Dictionary</a></li>\n<li><a href=\"https://leetcode.com/problems/palindrome-permutation-ii/\">Palindrome Permutation II</a></li>\n<li><a href=\"https://leetcode.com/problems/palindrome-permutation/\">Palindrome Permutation</a></li>\n<li><a href=\"https://leetcode.com/problems/paint-house-ii/\">Paint House II</a></li>\n<li><a href=\"https://leetcode.com/problems/graph-valid-tree/\">Graph Valid Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/3sum-smaller/\">3Sum Smaller</a></li>\n<li><a href=\"https://leetcode.com/problems/paint-house/\">Paint House</a></li>\n<li><a href=\"https://leetcode.com/problems/verify-preorder-sequence-in-binary-search-tree/\">Verify Preorder Sequence in Binary Search Tree</a></li>\n<li><a href=\"https://leetcode.com/problems/factor-combinations/\">Factor Combinations</a></li>\n<li><a href=\"https://leetcode.com/problems/meeting-rooms-ii/\">Meeting Rooms II</a></li>\n<li><a href=\"https://leetcode.com/problems/meeting-rooms/\">Meeting Rooms</a></li>\n<li><a href=\"https://leetcode.com/problems/flatten-2d-vector/\">Flatten 2D Vector</a></li>\n<li><a href=\"https://leetcode.com/problems/count-univalue-subtrees/\">Count Univalue Subtrees</a></li>\n<li><a href=\"https://leetcode.com/problems/group-shifted-strings/\">Group Shifted Strings</a></li>\n<li><a href=\"https://leetcode.com/problems/strobogrammatic-number-iii/\">Strobogrammatic Number III</a></li>\n<li><a href=\"https://leetcode.com/problems/strobogrammatic-number-ii/\">Strobogrammatic Number II</a></li>\n<li><a href=\"https://leetcode.com/problems/strobogrammatic-number/\">Strobogrammatic Number</a></li>\n<li><a href=\"https://leetcode.com/problems/shortest-word-distance-iii/\">Shortest Word Distance III</a></li>\n<li><a href=\"https://leetcode.com/problems/shortest-word-distance-ii/\">Shortest Word Distance II</a></li>\n<li><a href=\"https://leetcode.com/problems/shortest-word-distance/\">Shortest Word Distance</a></li>\n<li><a href=\"https://leetcode.com/problems/reverse-words-in-a-string-ii/\">Reverse Words in a String II</a></li>\n<li><a href=\"https://leetcode.com/problems/two-sum-iii-data-structure-design/\">Two Sum III - Data structure design</a></li>\n<li><a href=\"https://leetcode.com/problems/missing-ranges/\">Missing Ranges</a></li>\n<li><a href=\"https://leetcode.com/problems/one-edit-distance/\">One Edit Distance</a></li>\n<li><a href=\"https://leetcode.com/problems/longest-substring-with-at-most-two-distinct-characters/\">Longest Substring with At Most Two Distinct Characters</a></li>\n<li><a href=\"https://leetcode.com/problems/read-n-characters-given-read4-ii-call-multiple-times/\">Read N Characters Given Read4 II - Call multiple times</a></li>\n<li><a href=\"https://leetcode.com/problems/read-n-characters-given-read4/\">Read N Characters Given Read4</a></li>\n<li><a href=\"https://leetcode.com/problems/binary-tree-upside-down/\">Binary Tree Upside Down</a></li>\n</ol>"},{"id":360011984733,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011984733.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011984733-Do-I-have-to-solve-the-contest-problems-in-a-particular-order","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":163,"vote_count":191,"upvote_count":177,"downvote_count":14,"section_id":360002862534,"created_at":"2018-11-10T00:05:24Z","updated_at":"2026-10-25T14:53:48Z","name":"Do I have to solve the contest problems in a particular order?","title":"Do I have to solve the contest problems in a particular order?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T01:39:02Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>No, you can solve the problems in any order you like. Feel free to read all of the problems at the beginning of contest. Looking at a problem does not affect your ranking.</p>"},{"id":360011984633,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011984633.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011984633-How-to-cancel-my-premium-subscription","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":1,"vote_sum":-406,"vote_count":474,"upvote_count":34,"downvote_count":440,"section_id":360002895913,"created_at":"2018-11-10T00:02:11Z","updated_at":"2026-11-02T17:19:18Z","name":"How to cancel my premium subscription?","title":"How to cancel my premium subscription?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:43:41Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p> </p>\n<div class=\"text__2Esm\"><strong>You must cancel your current subscription on <a href=\"https://leetcode.com/subscription/\" target=\"_self\">your account Billing</a><a href=\"https://leetcode.com/subscription/\" target=\"_self\"> page</a> before its renewal date to avoid the next billing. </strong></div>\n<div class=\"text__2Esm\"><span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-101\"></span></div>\n<div class=\"text__2Esm\">\n<span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-101\">Here is a step-by-step instruction to cancel your current subscription:</span><span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-101\"></span>\n</div>\n<ol>\n<li class=\"li__2_aY depth1__1jC3\" data-key=\"section_1145866\" data-slate-fragment=\"JTdCJTIyb2JqZWN0JTIyJTNBJTIyZG9jdW1lbnQlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTIycGxhdGZvcm0lMjIlM0ElMjJ0aG91Z2h0cyUyMiU3RCUyQyUyMm5vZGVzJTIyJTNBJTVCJTdCJTIyb2JqZWN0JTIyJTNBJTIyYmxvY2slMjIlMkMlMjJ0eXBlJTIyJTNBJTIydW5vcmRlcmVkLWxpc3Qtd3JhcHBlciUyMiUyQyUyMmRhdGElMjIlM0ElN0IlN0QlMkMlMjJub2RlcyUyMiUzQSU1QiU3QiUyMm9iamVjdCUyMiUzQSUyMmJsb2NrJTIyJTJDJTIydHlwZSUyMiUzQSUyMnVub3JkZXJlZC1saXN0LWl0ZW0lMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTJDJTIybm9kZXMlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJ0ZXh0JTIyJTJDJTIybGVhdmVzJTIyJTNBJTVCJT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yMlVOREVSTElORSUyMiUyQyUyMmRhdGElMjIlM0ElN0IlN0QlN0QlNUQlN0QlNUQlN0QlNUQlN0QlMkMlN0IlMjJvYmplY3QlMjIlM0ElMjJ0ZXh0JTIyJTJDJTIybGVhdmVzJTIyJTNBJTVCJTdCJTIyb2JqZWN0JTIyJTNBJTIybGVhZiUyMiUyQyUyMnRleHQlMjIlM0ElMjIpJTIwJTNFJTIwVXNlJTIwJTVDJTIyMS1DbGljayUyMENhbmNlbGxhdGlvbiU1QyUyMiUyMHRvJTIwY2FuY2VsJTIweW91ciUyMGN1cnJlbnQlMjBzdWJzY3JpcHRpb24uJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0Q=\">\n<span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-102\">Go to your account <a href=\"https://leetcode.com/profile/\" target=\"_self\">profile page</a></span><span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-105\">;</span>\n</li>\n<li class=\"li__2_aY depth1__1jC3\" data-key=\"section_1145866\" data-slate-fragment=\"JTdCJTIyb2JqZWN0JTIyJTNBJTIyZG9jdW1lbnQlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTIycGxhdGZvcm0lMjIlM0ElMjJ0aG91Z2h0cyUyMiU3RCUyQyUyMm5vZGVzJTIyJTNBJTVCJTdCJTIyb2JqZWN0JTIyJTNBJTIyYmxvY2slMjIlMkMlMjJ0eXBlJTIyJTNBJTIydW5vcmRlcmVkLWxpc3Qtd3JhcHBlciUyMiUyQyUyMmRhdGElMjIlM0ElN0IlN0QlMkMlMjJub2RlcyUyMiUzQSU1QiU3QiUyMm9iamVjdCUyMiUzQSUyMmJsb2NrJTIyJTJDJTIydHlwZSUyMiUzQSUyMnVub3JkZXJlZC1saXN0LWl0ZW0lMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTJDJTIybm9kZXMlMjIlM0ElNUIlN0IlMjJv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lN0IlMjJvYmplY3QlMjIlM0ElMjJtYXJrJTIyJTJDJTIydHlwZSUyMiUzQSUyMlVOREVSTElORSUyMiUyQyUyMmRhdGElMjIlM0ElN0IlN0QlN0QlNUQlN0QlNUQlN0QlNUQlN0QlMkMlN0IlMjJvYmplY3QlMjIlM0ElMjJ0ZXh0JTIyJTJDJTIybGVhdmVzJTIyJTNBJTVCJTdCJTIyb2JqZWN0JTIyJTNBJTIybGVhZiUyMiUyQyUyMnRleHQlMjIlM0ElMjIpJTIwJTNFJTIwVXNlJTIwJTVDJTIyMS1DbGljayUyMENhbmNlbGxhdGlvbiU1QyUyMiUyMHRvJTIwY2FuY2VsJTIweW91ciUyMGN1cnJlbnQlMjBzdWJzY3JpcHRpb24uJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0Q=\"><span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-105\">Locate and click into <a href=\"https://leetcode.com/subscription/\" target=\"_self\">Billing</a>;</span></li>\n<li class=\"li__2_aY depth1__1jC3\" data-key=\"section_1145866\" data-slate-fragment=\"JTdCJTIyb2JqZWN0JTIyJTNBJTIyZG9jdW1lbnQlMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTIycGxhdGZvcm0lMjIlM0ElMjJ0aG91Z2h0cyUyMiU3RCUyQyUyMm5vZGVzJTIyJTNBJTVCJTdCJTIyb2JqZWN0JTIyJTNBJTIyYmxvY2slMjIlMkMlMjJ0eXBlJTIyJTNBJTIydW5vcmRlcmVkLWxpc3Qtd3JhcHBlciUyMiUyQyUyMmRhdGElMjIlM0ElN0IlN0QlMkMlMjJub2RlcyUyMiUzQSU1QiU3QiUyMm9iamVjdCUyMiUzQSUyMmJsb2NrJTIyJTJDJTIydHlwZSUyMiUzQSUyMnVub3JkZXJlZC1saXN0LWl0ZW0lMjIlMkMlMjJkYXRhJTIyJTNBJTdCJTdEJTJDJTIybm9kZXMlMjIlM0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MlMjIlM0ElNUIlN0IlMjJvYmplY3QlMjIlM0ElMjJtYXJrJTIyJTJDJTIydHlwZSUyMiUzQSUyMlVOREVSTElORSUyMiUyQyUyMmRhdGElMjIlM0ElN0IlN0QlN0QlNUQlN0QlNUQlN0QlNUQlN0QlMkMlN0IlMjJvYmplY3QlMjIlM0ElMjJ0ZXh0JTIyJTJDJTIybGVhdmVzJTIyJTNBJTVCJTdCJTIyb2JqZWN0JTIyJTNBJTIybGVhZiUyMiUyQyUyMnRleHQlMjIlM0ElMjIpJTIwJTNFJTIwVXNlJTIwJTVDJTIyMS1DbGljayUyMENhbmNlbGxhdGlvbiU1QyUyMiUyMHRvJTIwY2FuY2VsJTIweW91ciUyMGN1cnJlbnQlMjBzdWJzY3JpcHRpb24uJTIyJTJDJTIybWFya3MlMjIlM0ElNUIlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0QlNUQlN0Q=\">\n<span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-108\">Use \"Cancel\" to cancel your current subscription.</span><span data-key=\"078dd5a0-8efc-11ea-94c0-a3e9991c2e9d-101\"></span>\n</li>\n</ol>\n<div class=\"text__2Esm\">For more subscription cancellation information, please review our <a href=\"https://leetcode.com/terms/\" target=\"_self\">Refund and Cancellation Policy</a>.</div>\n<p> </p>"},{"id":360011884834,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011884834.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011884834-What-is-LeetCode-s-Cancellation-Refund-and-Termination-Policy","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":true,"position":2,"vote_sum":-444,"vote_count":600,"upvote_count":78,"downvote_count":522,"section_id":360002895913,"created_at":"2018-11-10T01:16:50Z","updated_at":"2026-11-01T13:43:16Z","name":"What is LeetCode's Cancellation, Refund, and Termination Policy?","title":"What is LeetCode's Cancellation, Refund, and Termination Policy?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2026-05-09T08:42:49Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>You can find the Cancellation, Refund, and Termination policy on the <a href=\"https://leetcode.com/terms/\" target=\"_blank\" rel=\"noopener noreferrer\">Terms of Service</a> page.</p><ul>\n<li data-list-item-id=\"e4e729a946611537594a12ce52d7e3e8c\">You can cancel your current Premium subscription in your Manage Subscription page by following the instruction in the <a href=\"https://support.leetcode.com/hc/en-us/articles/360011984633-What-if-I-sign-up-and-want-to-cancel-the-premium-subscription-\" target=\"_self\">Support Article: How to cancel my premium subscription</a>. You must cancel your subscription before your renewal date to avoid the next billing.</li>\n<li data-list-item-id=\"e88054a93ff56ddf95379fe15c3febfc7\">After cancellation, your subscription will remain active until the end of the current billing period and you will have continued access to your subscription for the remainder of that period (unless your access is suspended or terminated as set forth below), but you will not receive a refund.</li>\n<li data-list-item-id=\"e03888cba4e080a4154a7fe803a19799b\">LeetCode may deny you access to all or any part of the Services or terminate your account with or without prior notice if you engage in any conduct or activities that LeetCode determines, in its sole discretion, violates LeetCode's Terms of Service or the rights of LeetCode or is otherwise inappropriate. Without limitation, LeetCode may deny you access to the Services or terminate your LeetCode account, without providing any refund.</li>\n<li data-list-item-id=\"ed7e947c5d48a549537c004d7f26e80d6\"><div data-lark-html-role=\"root\">\n<div><div role=\"text-message\" data-im-copy-permission-invalid=\"false\" data-im-copy-permission-invalid-toast=\"\"><div><div><div><div data-message-descendant-index=\"0\" data-message-descendant-block=\"true\"><div><div dir=\"auto\" data-partial-quote-enabled=\"true\">\n<span data-eleid=\"3\">In most cases, LeetCode subscriptions are non-refundable, as clearly stated in </span><a href=\"https://leetcode.com/terms/\" target=\"_blank\" rel=\"noopener noreferrer\" data-eleid=\"4\" data-lark-is-custom=\"true\" data-lark-link=\"true\">LeetCode Terms of Service</a><span data-eleid=\"5\">. This policy lets us keep </span><span data-eleid=\"5\">LeetCode</span><span data-eleid=\"5\"> affordable for all users while investing in ongoing feature updates and platform improvements.</span><span data-eleid=\"2\"> </span><span data-eleid=\"7\">That being said, we do review all refund requests on a case-by-case basis and may make exceptions depending on individual circumstances.</span><span data-eleid=\"6\"> </span><span data-eleid=\"9\">We carefully evaluate every submission. Although we sincerely wish we could accommodate all requests, refunds are generally not granted under standard policy.</span><span data-eleid=\"8\"> </span><span data-eleid=\"11\">If your refund request was not approved, it means our thorough review determined it does not meet the eligibility criteria.</span>\n</div></div></div></div></div></div></div></div>\n<div data-message-descendant-index=\"1\" data-message-descendant-bounded=\"true\"><div><div><div data-element-id=\"root\"><div><div data-element-id=\"rootLayout\"><div><div data-element-id=\"header\"><div><div><div>\n<div><div> </div></div>\n<div> </div>\n</div></div></div></div></div></div></div></div></div></div></div>\n</div></li>\n</ul><p>For any other billing questions, please contact <a href=\"mailto:billing@leetcode.com\">billing@leetcode.com</a>.</p><p><br><br> </p>"},{"id":360011884474,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011884474.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011884474-How-do-I-change-my-username","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":2,"vote_sum":-25,"vote_count":141,"upvote_count":58,"downvote_count":83,"section_id":360002895793,"created_at":"2018-11-10T00:55:46Z","updated_at":"2026-11-04T09:36:49Z","name":"How do I change my username? ","title":"How do I change my username? ","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T07:16:18Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>You can change your LeetCode username in the 'Account Information' section of your <a href=\"https://leetcode.com/profile/account/\" target=\"_blank\" rel=\"noopener\">Profile page</a>. Click on 'Account' -&gt; 'LeetCode ID' -&gt; 'Edit'.</p>"},{"id":360011985073,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011985073.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011985073-What-are-the-premium-articles-Is-there-a-sample-I-can-look-at","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":2,"vote_sum":-5,"vote_count":9,"upvote_count":2,"downvote_count":7,"section_id":360002895973,"created_at":"2018-11-10T00:28:27Z","updated_at":"2026-09-20T22:43:01Z","name":"What are the premium articles? Is there a sample I can look at?","title":"What are the premium articles? Is there a sample I can look at?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T07:29:25Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Some of the articles are reserved for premium subscribers only. You can take a look at this <a href=\"https://leetcode.com/articles/first-bad-version\" target=\"_blank\" rel=\"noopener\">free sample article here</a>. Please note that we are adding more articles so please check back frequently.</p>"},{"id":360011883834,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011883834.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011883834-How-does-the-ranking-work-in-a-contest","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":2,"vote_sum":51,"vote_count":211,"upvote_count":131,"downvote_count":80,"section_id":360002862534,"created_at":"2018-11-10T00:06:13Z","updated_at":"2026-11-07T19:29:15Z","name":"How does the ranking work in a contest?","title":"How does the ranking work in a contest?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T01:44:20Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Each problem has an assigned score. Usually a more challenging problem has a higher score. Your objective is to obtain the highest score with the fastest finish time while making as few mistakes as possible. For more details about how to calculate your finish time, check <a href=\"https://support.leetcode.com/hc/en-us/articles/360011984773-What-does-the-Finish-Penalty-Time-column-mean-in-the-ranking-\">What does the Finish/Penalty Time column mean in the ranking?</a>.</p>"},{"id":360011833974,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011833974.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011833974-What-are-the-environments-for-the-programming-languages","author_id":368453300473,"comments_disabled":false,"draft":false,"promoted":true,"position":2,"vote_sum":125,"vote_count":195,"upvote_count":160,"downvote_count":35,"section_id":360002895993,"created_at":"2018-11-09T02:27:25Z","updated_at":"2026-08-24T18:00:49Z","name":"What are the environments for the programming languages?","title":"What are the environments for the programming languages?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2026-03-02T02:50:27Z","user_segment_id":null,"permission_group_id":2491634,"body":"<figure class=\"wysiwyg-table wysiwyg-table-align-left\" style=\"height: 571px; width: 762px;\"><table>\n<thead><tr style=\"height: 21px;\">\n<th style=\"height: 20px; padding: 4px; text-align: center; width: 102.141px;\">Language</th>\n<th style=\"height: 20px; padding: 4px; text-align: center; width: 115.141px;\">Version</th>\n<th style=\"height: 20px; padding: 4px; text-align: center; width: 516.719px;\">Notes</th>\n</tr></thead>\n<tbody>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">C++</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">\n<code>clang 19</code> using the latest C++ 23 standard, and libstdc++ provided by GCC 14.</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">\n<p>Compiled with <code>clang 19</code> using the latest C++ 23 standard, and libstdc++ provided by GCC 14.</p>\n<p>Your code is compiled with level two optimization (<code>-O2</code>). <a href=\"https://github.com/google/sanitizers/wiki/AddressSanitizer\" target=\"_blank\" rel=\"noopener noreferrer\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\n<p>Most standard library headers are already included automatically for your convenience.</p>\n</td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Java</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">java 25</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">\n<p><code>OpenJDK 25 </code>. Java 8 features such as lambda expressions and stream API can be used.</p>\n<p>Most standard library headers are already included automatically for your convenience.</p>\n<p>Includes <code>Pair</code> class from https://docs.oracle.com/javase/8/javafx/api/javafx/util/Pair.html.</p>\n</td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Python</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">python 2.7.18</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\"https://docs.python.org/2/library/array.html\" target=\"_blank\" rel=\"noopener noreferrer\">array</a>, <a href=\"https://docs.python.org/2/library/bisect.html\" target=\"_blank\" rel=\"noopener noreferrer\">bisect</a>, <a href=\"https://docs.python.org/2/library/collections.html\" target=\"_blank\" rel=\"noopener noreferrer\">collections</a>. If you need more libraries, you can import it yourself.</p>\n<p>For Map/TreeMap data structure, you may use <a href=\"http://www.grantjenks.com/docs/sortedcontainers/\" target=\"_blank\" rel=\"noopener noreferrer\">sortedcontainers</a> library.</p>\n<p>Note that Python 2.7 <a href=\"https://www.python.org/dev/peps/pep-0373/\" target=\"_blank\" rel=\"noopener noreferrer\">is not maintained anymore</a>. For the latest Python, please choose Python3 instead.</p>\n</td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Python3</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">Python 3.14</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">\n<p>Most libraries are already imported automatically for your convenience, such as <a href=\"https://docs.python.org/3/library/array.html\" target=\"_blank\" rel=\"noopener noreferrer\">array</a>, <a href=\"https://docs.python.org/3/library/bisect.html\" target=\"_blank\" rel=\"noopener noreferrer\">bisect</a>, <a href=\"https://docs.python.org/3/library/collections.html\" target=\"_blank\" rel=\"noopener noreferrer\">collections</a>. If you need more libraries, you can import it yourself.</p>\n<p>For Map/TreeMap data structure, you may use <a href=\"http://www.grantjenks.com/docs/sortedcontainers/\" target=\"_blank\" rel=\"noopener noreferrer\">sortedcontainers</a> library.</p>\n</td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">MySQL</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">MySQL 8.0</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">Note: For legacy reason, we didn't enable any SQL mode, including <code>ONLY_FULL_GROUP_BY</code>, <code>STRICT_TRANS_TABLES</code>, <code>NO_ZERO_IN_DATE</code>, <code>NO_ZERO_DATE</code>, <code>ERROR_FOR_DIVISION_BY_ZERO</code> and more.</td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">MS SQL Server</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">mssql server 2019</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Oracle</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">Oracle SQL 11.2</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 43px;\">\n<td style=\"height: 43px; padding: 4px; width: 102.141px;\">C</td>\n<td style=\"height: 43px; padding: 4px; width: 115.141px;\">gcc 14</td>\n<td style=\"height: 43px; padding: 4px; width: 516.719px;\">\n<p>Compiled with <code>gcc 14</code> using the gnu11 standard.</p>\n<p>Your code is compiled with level one optimization (<code>-O2</code>). <a href=\"https://github.com/google/sanitizers/wiki/AddressSanitizer\" target=\"_blank\" rel=\"noopener noreferrer\">AddressSanitizer</a> is also enabled to help detect out-of-bounds and use-after-free bugs.</p>\n<p>Most standard library headers are already included automatically for your convenience.</p>\n<p>You may use data structures from <a href=\"https://docs.gtk.org/glib/index.html\" target=\"_blank\" rel=\"noopener noreferrer\">GLib 2.0</a>, such as GQueue, GTree and more.</p>\n<p>For hash table operations, you may use <a href=\"https://troydhanson.github.io/uthash/\" target=\"_blank\" rel=\"noopener noreferrer\">uthash</a>. \"uthash.h\" is included by default. Below are some examples:</p>\n<p><strong>1. Adding an item to a hash.</strong></p>\n<pre class=\"wysiwyg-code-block\"><code class=\"language-auto\">struct hash_entry {\n    int id;            /* we'll use this field as the key */\n    char name[10];\n    UT_hash_handle hh; /* makes this structure hashable */\n};\n\nstruct hash_entry *users = NULL;\n\nvoid add_user(struct hash_entry *s) {\n    HASH_ADD_INT(users, id, s);\n}\n</code></pre>\n<p> </p>\n<p><strong>2. Looking up an item in a hash:</strong></p>\n<pre class=\"wysiwyg-code-block\"><code class=\"language-auto\">struct hash_entry *find_user(int user_id) {\n    struct hash_entry *s;\n    HASH_FIND_INT(users, &amp;user_id, s);\n    return s;\n}\n</code></pre>\n<p> </p>\n<p><strong>3. Deleting an item in a hash:</strong></p>\n<pre class=\"wysiwyg-code-block\"><code class=\"language-auto\">void delete_user(struct hash_entry *user) {\n    HASH_DEL(users, user);  \n}</code></pre>\n</td>\n</tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; padding: 4px; width: 102.141px;\">C#</td>\n<td style=\"height: 22px; padding: 4px; width: 115.141px;\"><a href=\"https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14\" target=\"_blank\" rel=\"noopener noreferrer\">C# 14 with .NET 10 runtime</a></td>\n<td style=\"height: 22px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 43px;\">\n<td style=\"height: 43px; padding: 4px; width: 102.141px;\">JavaScript</td>\n<td style=\"height: 43px; padding: 4px; width: 115.141px;\">node.js 22.14.0</td>\n<td style=\"height: 43px; padding: 4px; width: 516.719px;\">\n<p>Your code is run with <code>--harmony</code> flag, enabling <a href=\"http://node.green/\" target=\"_blank\" rel=\"noopener noreferrer\">new ES6 features</a>.</p>\n<p><a href=\"https://lodash.com/\" target=\"_blank\" rel=\"noopener noreferrer\">lodash.js@4.17.21</a> library is included by default.</p>\n<p>You may use data structures from <a href=\"https://datastructures-js.info/docs\" target=\"_blank\" rel=\"noopener noreferrer\">datastructures-js</a> library. Version info:</p>\n<pre>\"@datastructures-js/binary-search-tree\": \"5.4.0\"\n\"@datastructures-js/deque\": \"1.0.8\"\n\"@datastructures-js/graph\": \"5.3.1\"\n\"@datastructures-js/heap\": \"4.3.7\"\n\"@datastructures-js/linked-list\": \"6.1.4\"\n\"@datastructures-js/priority-queue\": \"6.3.5\"\n\"@datastructures-js/queue\": \"4.3.0\"\n\"@datastructures-js/set\": \"4.2.2\"\n\"@datastructures-js/stack\": \"3.1.6\"\n\"@datastructures-js/trie\": \"4.2.3\"</pre>\n<p>For Binary Search Tree, Trie, and Graph, please import them manually when you need to use them, as their names conflict with certain problems.</p>\n</td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Ruby</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">ruby 3.2</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\"><div class=\"lc-modal-body__jO0c\"><div><p>Some common data structure implementations are provided in the Algorithms module: <a href=\"https://www.rubydoc.info/github/kanwei/algorithms/Algorithms\" target=\"_self\">https://www.rubydoc.info/github/kanwei/algorithms/Algorithms</a></p></div></div></td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Bash</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">bash 5.2.21</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Swift</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">swift 6.0</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">You may use <a href=\"https://github.com/apple/swift-algorithms/tree/1.2.0\">swift-algorithms 1.2.0</a> and <a href=\"https://github.com/apple/swift-collections/tree/1.1.4\">swift-collections 1.1.4</a> and <a href=\"https://github.com/apple/swift-numerics/tree/1.0.2\">swift-numerics 1.0.2</a>. </td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Go</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">go 1.23</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">Support <a href=\"https://github.com/emirpasic/gods/tree/v1.18.1\" target=\"_blank\" rel=\"noopener noreferrer\">https://godoc.org/github.com/emirpasic/gods@v1.18.1</a> and <a href=\"https://pkg.go.dev/github.com/emirpasic/gods/v2@v2.0.0-alpha\" target=\"_blank\" rel=\"noopener noreferrer\">https://pkg.go.dev/github.com/emirpasic/gods/v2@v2.0.0-alpha</a> library.</td>\n</tr>\n<tr style=\"height: 13px;\">\n<td style=\"height: 13px; padding: 4px; width: 102.141px;\">Scala</td>\n<td style=\"height: 13px; padding: 4px; width: 115.141px;\">Scala 3.3.1</td>\n<td style=\"height: 13px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Kotlin</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">Kotlin 2.1.10</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">Rust</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\"><div data-lark-html-role=\"root\"><span class=\"text-only\" style=\"white-space: pre;\" data-eleid=\"3\">1.88.0</span></div></td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\"><div class=\"lc-modal-body__jO0c\"><div><div data-lark-html-role=\"root\">\n<span class=\"text-only\" style=\"white-space: pre;\" data-eleid=\"3\">Using edition 2024. </span>Your code will be compiled with opt-level 2. Supports <a href=\"https://crates.io/crates/rand\" target=\"_blank\" rel=\"noopener noreferrer\">rand </a>v0.8 and <a href=\"https://crates.io/crates/regex\" target=\"_blank\" rel=\"noopener noreferrer\">regex v1</a> and <a href=\"https://crates.io/crates/itertools\">itertools v0.14</a> from crates.io</div></div></div></td>\n</tr>\n<tr style=\"height: 21px;\">\n<td style=\"height: 21px; padding: 4px; width: 102.141px;\">PHP</td>\n<td style=\"height: 21px; padding: 4px; width: 115.141px;\">PHP 8.2</td>\n<td style=\"height: 21px; padding: 4px; width: 516.719px;\">With bcmath module</td>\n</tr>\n<tr style=\"height: 50px;\">\n<td style=\"height: 50px; padding: 4px; width: 102.141px;\">Typescript</td>\n<td style=\"height: 50px; padding: 4px; width: 115.141px;\">TypeScript 5.7.3, Node.js 22.14.0</td>\n<td style=\"height: 50px; padding: 4px; width: 516.719px;\"><div class=\"px-6 pt-4 pb-0\"><div class=\"children:mb-5 text-label-2 dark:text-dark-label-2 fI1u6\">\n<p>Compile Options: <code>--alwaysStrict --strictBindCallApply --strictFunctionTypes --target ES2024</code></p>\n<p><a href=\"https://lodash.com/\" target=\"_blank\" rel=\"noopener noreferrer\">lodash.js@4.16.21</a> library is included by default. </p>\n<p>You may use data structures from <a href=\"https://datastructures-js.info/docs\" target=\"_blank\" rel=\"noopener noreferrer\">datastructures-js</a> library. Version info:</p>\n<pre>\"@datastructures-js/binary-search-tree\": \"5.4.0\"\n\"@datastructures-js/deque\": \"1.0.8\"\n\"@datastructures-js/graph\": \"5.3.1\"\n\"@datastructures-js/heap\": \"4.3.7\"\n\"@datastructures-js/linked-list\": \"6.1.4\"\n\"@datastructures-js/priority-queue\": \"6.3.5\"\n\"@datastructures-js/queue\": \"4.3.0\"\n\"@datastructures-js/set\": \"4.2.2\"\n\"@datastructures-js/stack\": \"3.1.6\"\n\"@datastructures-js/trie\": \"4.2.3\"\n</pre>\n<p>For Binary Search Tree, Trie, and Graph, please import them manually like the following when you need to use them, as their names conflict with certain problems.</p>\n</div></div></td>\n</tr>\n<tr style=\"height: 20px;\">\n<td style=\"height: 20px; padding: 4px; width: 102.141px;\">Racket</td>\n<td style=\"height: 20px; padding: 4px; width: 115.141px;\">\n<a href=\"https://docs.racket-lang.org/guide/performance.html#%28tech._c%29\" target=\"_blank\" rel=\"noopener noreferrer\">Racket CS</a> v8.15</td>\n<td style=\"height: 20px; padding: 4px; width: 516.719px;\"><div class=\"px-6 pt-4 pb-0\"><div class=\"children:mb-5 text-label-2 dark:text-dark-label-2 fI1u6\">\n<p>Using <code>#lang racket</code></p>\n<p>Required <code>data/gvector data/queue data/order data/heap</code> automatically for your convenience</p>\n</div></div></td>\n</tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; padding: 4px; width: 102.141px;\">Erlang</td>\n<td style=\"height: 22px; padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\"><div>Erlang/OTP 26</div></div></td>\n<td style=\"height: 22px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; padding: 4px; width: 102.141px;\">Elixir</td>\n<td style=\"height: 22px; padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\">Elixir 1.17 with Erlang/OTP 26</div></td>\n<td style=\"height: 22px; padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr style=\"height: 22px;\">\n<td style=\"height: 22px; padding: 4px; width: 102.141px;\">Dart</td>\n<td style=\"height: 22px; padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\">Dart 3.2</div></td>\n<td style=\"height: 22px; padding: 4px; width: 516.719px;\">You may use package <a href=\"https://pub.dev/packages/collection/versions/1.18.0\" target=\"_blank\" rel=\"noopener noreferrer\">collection</a>. Your code will be run directly without compiling</td>\n</tr>\n<tr>\n<td style=\"padding: 4px; width: 102.141px;\"><div>PostgreSQL</div></td>\n<td style=\"padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\"><div>PostgreSQL 16</div></div></td>\n<td style=\"padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr>\n<td style=\"padding: 4px; width: 102.141px;\"><div><div>Pandas</div></div></td>\n<td style=\"padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\"><div><div>Python 3.10 with Pandas 2.2.2 and NumPy 1.26.4</div></div></div></td>\n<td style=\"padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr>\n<td style=\"padding: 4px; width: 102.141px;\"><div><div><div>React</div></div></div></td>\n<td style=\"padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\"><div><div><div>Node.js 18 with react@18.2.0</div></div></div></div></td>\n<td style=\"padding: 4px; width: 516.719px;\"> </td>\n</tr>\n<tr>\n<td style=\"padding: 4px; width: 102.141px;\"><div><div><div><div>Vanilla JS</div></div></div></div></td>\n<td style=\"padding: 4px; width: 115.141px;\"><div class=\"lc-modal-body__jO0c\"><div><div><div><div>ECMAScript 2023</div></div></div></div></div></td>\n<td style=\"padding: 4px; width: 516.719px;\"> </td>\n</tr>\n</tbody>\n</table></figure><p> </p>"},{"id":360013577094,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360013577094.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360013577094-How-to-use-My-List","author_id":390179848494,"comments_disabled":true,"draft":false,"promoted":false,"position":3,"vote_sum":150,"vote_count":192,"upvote_count":171,"downvote_count":21,"section_id":360002516153,"created_at":"2018-12-13T02:21:05Z","updated_at":"2026-09-24T09:04:49Z","name":"How to use My List","title":"How to use My List","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:51:49Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>With LeetCode's ever-expanding Problems database, what if, you could construct your own lists? One where you could share with friends, family, or study groups? LeetCode's got you covered. With a List, you can challenge, collect, and share your curated Problem List with any LeetCoder!</p>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.leetcode.com/hc/article_attachments/360052982114/Screen_Shot_2019-12-12_at_5.11.47_PM.png\" alt=\"Screen_Shot_2019-12-12_at_5.11.47_PM.png\" width=\"534\" height=\"374\"></p>\n<p class=\"wysiwyg-text-align-left\"> </p>\n<hr style=\"border: 0; height: 1px; margin: 1em 0; border-top: 1px solid #ccc;\">\n<p> </p>\n<p><span class=\"wysiwyg-font-size-x-large\">1. Create Your List</span></p>\n<table class=\"no-border\" style=\"height: 246px; border: none;\" width=\"700\">\n<tbody>\n<tr class=\"firstRow\">\n<td style=\"width: 441px; border: none;\" valign=\"top\">\n<p>LeetCode provides a system default list called \"Favorite\". Navigate to any question's page and click on <span style=\"white-space: nowrap;\">\"<img style=\"vertical-align: middle;\" src=\"https://support.leetcode.com/hc/article_attachments/360053973373/favorite.png\" alt=\"favorite.png\" width=\"15\" height=\"15\"> Favorite\"</span> to add the question to the default Favorite list.</p>\n<p>If you need to add an additional list, just hover over <span style=\"white-space: nowrap;\">\"<img style=\"vertical-align: middle;\" src=\"https://support.leetcode.com/hc/article_attachments/360053973373/favorite.png\" alt=\"favorite.png\" width=\"15\" height=\"15\"> Favorite\"</span> and click on \"+ Create a new list\" in the popup menu.</p>\n<p>Newly created Lists are set to \"Private\" by default, meaning it will be visible only to you. Whereas setting a List to \"Public\", means anyone with a link<span class=\"wysiwyg-font-size-small\" style=\"vertical-align: top;\">*</span> to the List will have access to view and utilize it.</p>\n<p><strong><span class=\"wysiwyg-font-size-small\"><em>* </em><em>You may go to <a href=\"https://leetcode.com/list\" target=\"_blank\" rel=\"noopener\">My List</a> page to obtain the list's shareable url.</em></span></strong></p>\n</td>\n<td style=\"text-align: right; width: 236px; border: none;\" valign=\"top\"><img style=\"font-size: 16px; white-space: normal;\" src=\"https://support.leetcode.com/hc/article_attachments/360052982094/Screen_Shot_2019-12-12_at_5.12.27_PM.png\" alt=\"Screen_Shot_2019-12-12_at_5.12.27_PM.png\" width=\"267\" height=\"257\"></td>\n</tr>\n</tbody>\n</table>\n<p> </p>\n<p> </p>\n<p><span class=\"wysiwyg-font-size-x-large\">2. Practice Using Your List</span></p>\n<p>On a question's page, you may navigate effortlessly between questions with the bottom panel.</p>\n<p class=\"wysiwyg-text-align-left\"><img src=\"https://support.leetcode.com/hc/article_attachments/360053870693/Screen_Shot_2019-12-12_at_5.28.22_PM.png\" alt=\"Screen_Shot_2019-12-12_at_5.28.22_PM.png\" width=\"698\" height=\"392\"></p>\n<p class=\"wysiwyg-text-align-left\" style=\"padding-top: 5px; padding-bottom: 5px;\">Click on the bottom left <img style=\"vertical-align: bottom;\" src=\"https://support.leetcode.com/hc/article_attachments/360053961493/list_icon.png\" alt=\"list_icon.png\" width=\"25\" height=\"22\"> Problems button to browse all questions in the current list. You may also switch to a different list, search questions within the current list, filter questions by difficulty, status or tags.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360052982074/Screen_Shot_2019-12-12_at_5.18.13_PM.png\" alt=\"Screen_Shot_2019-12-12_at_5.18.13_PM.png\"><span class=\"wysiwyg-font-size-large\"></span></p>\n<p> </p>\n<p> </p>\n<p><span class=\"wysiwyg-font-size-x-large\">3. Manage Your List:</span></p>\n<table class=\"no-border\" style=\"height: 246px; border: none;\" width=\"700\">\n<tbody>\n<tr class=\"firstRow\">\n<td style=\"width: 441px; border: none;\" valign=\"top\">\n<p>You may access and manage your lists as follows:</p>\n<ol>\n<li>Click on your user avatar at the navbar's top right corner. You will see the user menu<span class=\"wysiwyg-font-size-small\" style=\"vertical-align: top;\">*</span> being expanded.<br> <em><span class=\"wysiwyg-font-size-medium\"><br></span></em>\n</li>\n<li>Click on \"My List\".<em><strong><span class=\"wysiwyg-font-size-small\"><br></span></strong></em>\n</li>\n</ol>\n<p><em><strong><span class=\"wysiwyg-font-size-small\">* Note that the user menu may look different depending which page you are on.</span></strong></em></p>\n<p>On <a href=\"https://leetcode.com/list\" target=\"_blank\" rel=\"noopener\">My List</a> page, you can set access permissions; clone, delete or rename a list. Note: The default \"Favorite\" list cannot be deleted.</p>\n</td>\n<td style=\"text-align: right; width: 236px; border: none;\" valign=\"top\"><img src=\"https://support.leetcode.com/hc/article_attachments/360053973533/user_menu.png\" alt=\"user_menu.png\"></td>\n</tr>\n</tbody>\n</table>\n<p>Once you have selected a list, your progress associated with the list is displayed on your right side.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360054434393/Screen_Shot_2019-12-19_at_11.58.40_AM.png\" alt=\"Screen_Shot_2019-12-19_at_11.58.40_AM.png\"></p>\n<p>As shown above, you can easily make an exact duplicate of a list by clicking on the \"Clone\" button.</p>\n<p> </p>\n<p><span class=\"wysiwyg-font-size-x-large\">4. Share, Clone or Watch a List</span></p>\n<p>Simply set your list to <img style=\"vertical-align: text-top;\" src=\"https://support.leetcode.com/hc/article_attachments/360053085174/public.png\" alt=\"public.png\" width=\"46\" height=\"20\">, click on the \"Share\" button and copy the generated URL from the displayed popup dialog. If your list was set to private, just click on the <span style=\"padding-left: 1px; padding-right: 1px;\"><img style=\"vertical-align: text-top;\" src=\"https://support.leetcode.com/hc/article_attachments/360053085194/private.png\" alt=\"private.png\" width=\"44\" height=\"20\"></span> button to toggle it from private to public. Once you share the link, anyone with access to the shareable link will be able to view your list.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360053086874/public_share_list.png\" alt=\"public_share_list.png\"></p>\n<p>As shown above, LeetCoders who access a shareable link will be able to preview the question list. One would need to <a href=\"https://leetcode.com/accounts/login\" target=\"_blank\" rel=\"noopener\">register</a> or <a href=\"https://leetcode.com/accounts/login\" target=\"_blank\" rel=\"noopener\">log in</a> to clone or watch a List.</p>\n<ul>\n<li>Clone a list: Clone a list and it becomes one of your lists. You may edit a cloned list, but you will not receive any updates to the original list.<br><br>\n</li>\n<li>Watch a list: Watch a list and it will appear in \"My Watch List\". You may not edit a watched list, but you will receive continuous updates from the list's owner. This could be extremely useful for a group practice session where the list is being actively updated.</li>\n</ul>\n<p> </p>"},{"id":360012200574,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360012200574.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360012200574-Can-I-upgrade-change-my-plan","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":3,"vote_sum":-65,"vote_count":131,"upvote_count":33,"downvote_count":98,"section_id":360002895913,"created_at":"2018-11-17T01:41:33Z","updated_at":"2026-11-01T14:30:26Z","name":"Can I upgrade/change my plan?","title":"Can I upgrade/change my plan?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T23:00:38Z","user_segment_id":null,"permission_group_id":2491634,"body":"<h3><span class=\"s1\">Switching from Monthly to Yearly subscription</span></h3>\n<p class=\"p1\"><span class=\"s1\">If you still have an active subscription under your account, you can easily upgrade to the annual plan by yourself. The price will be <strong>pro-rated</strong> accordingly based on your <strong>unused portion of the current monthly subscription</strong>. So the earlier you upgrade, the more discount you will get. </span></p>\n<p class=\"p1\"><span class=\"s1\">First, go to <a href=\"https://leetcode.com/subscribe\" target=\"_blank\" rel=\"noopener\"><span class=\"s2\">https://leetcode.com/subscribe</span></a>, click on Subscribe on the Annual plan, then select your payment method, and click on the Continue button.</span></p>\n<p class=\"p1\"><span class=\"s1\"><img src=\"https://support.leetcode.com/hc/article_attachments/360019000453/Screen_Shot_2018-11-16_at_5.38.56_PM.png\" alt=\"Screen_Shot_2018-11-16_at_5.38.56_PM.png\" width=\"369\" height=\"253\"></span></p>\n<p class=\"p1\"><span class=\"s1\">On the next page you should be able to see the pro-rated amount for your upgrade, as shown below.</span></p>\n<p class=\"p1\"><span class=\"s1\">     <img src=\"https://support.leetcode.com/hc/article_attachments/360020802314/Screen_Shot_2018-12-26_at_2.51.38_PM.png\" alt=\"Screen_Shot_2018-12-26_at_2.51.38_PM.png\" width=\"512\" height=\"491\"></span></p>\n<p class=\"p1\"> </p>\n<p class=\"p1\"><span class=\"s1\">Please note that we are unable to convert your past monthly premium subscription to annual premium subscription and charge you the difference. The pro-rated amount is only based on your unused portion of the <strong>current</strong> monthly subscription.</span></p>"},{"id":360011985573,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011985573.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011985573-How-do-I-change-my-password","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":3,"vote_sum":-14,"vote_count":28,"upvote_count":7,"downvote_count":21,"section_id":360002895793,"created_at":"2018-11-10T01:02:54Z","updated_at":"2024-03-05T06:08:37Z","name":"How do I change my password? ","title":"How do I change my password? ","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T07:16:12Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>You can change your password on the <a href=\"https://leetcode.com/accounts/password/change/\" target=\"_blank\" rel=\"noopener\">change password page</a>.</p>"},{"id":360011985113,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011985113.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011985113-How-does-grouping-questions-by-company-work","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":3,"vote_sum":-8,"vote_count":24,"upvote_count":8,"downvote_count":16,"section_id":360002895973,"created_at":"2018-11-10T00:32:03Z","updated_at":"2026-10-23T10:59:52Z","name":"How does grouping questions by company work?","title":"How does grouping questions by company work?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T01:29:16Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>We compile the list of questions asked by specific companies based on data from user surveys: \"<em>Have you met this question in a real interview?</em>\". The list is kept up to date frequently with the ever-growing survey data. You can find the list of companies on the <a href=\"https://leetcode.com/problemset/\" target=\"_blank\" rel=\"noopener\">problem list page</a>, look for the <img style=\"vertical-align: top;\" src=\"https://support.leetcode.com/hc/article_attachments/360017892534/Screen_Shot_2018-11-09_at_4.31.04_PM.png\" alt=\"Screen_Shot_2018-11-09_at_4.31.04_PM.png\" width=\"111\" height=\"26\">list.</p>"},{"id":360011984773,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011984773.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011984773-What-does-the-Finish-Penalty-Time-column-mean-in-the-ranking","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":3,"vote_sum":137,"vote_count":199,"upvote_count":168,"downvote_count":31,"section_id":360002862534,"created_at":"2018-11-10T00:09:54Z","updated_at":"2026-07-06T10:30:26Z","name":"What does the Finish/Penalty Time column mean in the ranking?","title":"What does the Finish/Penalty Time column mean in the ranking?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T01:47:13Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>Penalty time is <strong>5 minutes</strong> for each incorrect solution you submitted for problems you eventually solved. Finish time is equal to the time it took you to first correctly submit to your last solved problem measured from the start of the round plus penalty time.</p>\n<p>For example, if you have made the following submissions and let's assume each problem is worth 1 point for simplicity sake:</p>\n<pre>[2m10s]  Wrong Answer for problem A.\n[5m39s]  Accepted for problem A.\n[11m35s] Compile Error for problem B.\n[19m3s]  Time Limit Exceeded for problem B.\n[19m8s]  Internal Error for problem B.\n[20m45s] Accepted for problem B.\n[23m32s] Wrong Answer for problem B.\n[24m3s]  Accepted for problem B.\n[30m4s]  Wrong Answer for problem C.</pre>\n<p>Penalty time = 10m [1 Wrong Answer for problem A + 1 Time Limit Exceeded for problem B]). Note that penalty time due to 1 Wrong Answer for problem C is not counted because you did not solve C yet. Submissions that are judged as <strong>Accepted</strong>, <strong>Compile Error</strong>, <strong>Internal Error</strong>, or <strong>Timeout</strong> do not add to your penalty time.</p>\n<p>Your score will be 2 (according to the earlier assumption of 1 point per problem), with 30m45s finish time (including the 10m penalty time).</p>\n<p>Note that submitting a solution to a solved problem does not affect your finish/penalty time.</p>"},{"id":360011834174,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011834174.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011834174-I-encountered-Wrong-Answer-Runtime-Error-for-a-specific-test-case-When-I-test-my-code-using-this-test-case-it-produced-the-correct-output-Why","author_id":368453300473,"comments_disabled":false,"draft":false,"promoted":true,"position":3,"vote_sum":-143,"vote_count":485,"upvote_count":171,"downvote_count":314,"section_id":360002895993,"created_at":"2018-11-09T02:40:07Z","updated_at":"2026-08-16T23:34:41Z","name":"I encountered Wrong Answer/Runtime Error for a specific test case. When I test my code using this test case, it produced the correct output. Why?","title":"I encountered Wrong Answer/Runtime Error for a specific test case. When I test my code using this test case, it produced the correct output. Why?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T22:58:43Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>First, please check if you are using any <em>global</em> or <em>static</em> variables. <a href=\"https://programmers.stackexchange.com/questions/148108/why-is-global-state-so-evil\" target=\"_blank\" rel=\"noopener\">They are Evil, period</a>. If you must declare one, <strong>reset them in the first line</strong> of your called method or in the <em>default constructor</em>.</p>\n<p>Why? Because the system executes all test cases using the same program instance, global/static variables affect the program state from one test case to another. See <a href=\"https://leetcode.com/problems/generate-parentheses/discuss/10493/Different-answer-between-local-IDLE-and-LeetCode\" target=\"_blank\" rel=\"noopener\">this Discuss thread</a> for an example.</p>\n<p><img src=\"https://support.leetcode.com/hc/article_attachments/360021718253/runcode_result_inconsistent.png\" alt=\"runcode_result_inconsistent.png\" width=\"755\" height=\"382\"></p>\n<p>If you have checked all over your code and did not find any global/static variables usage, chances are your code has bugs in it which cause one of the earlier test cases to trigger an <a href=\"https://en.wikipedia.org/wiki/Undefined_behavior#Examples_in_C_and_C.2B.2B\" target=\"_blank\" rel=\"noopener\">undefined behavior</a>.</p>\n<p>How undefined behavior was triggered could vary from one language to another. We outline the most commonly encountered language-specific behavior below to help you in debugging shall you encounter one.</p>\n<p><strong>C/C++</strong></p>\n<p>The most frequent culprit causing undefined behavior is out-of-bounds array access. These bugs could be hard to debug, so good luck. Or just give up on C/C++ entirely and code in a more predictable language, <a href=\"https://stackoverflow.com/a/376379/490463\" target=\"_blank\" rel=\"noopener\">like Java</a>. :)</p>\n<p><strong>Java</strong></p>\n<p>In general, Java is a much safer language and employs some safety checks for you, such as out-of-bounds array access checking. However, even then, it is not 100% foolproof and you could still encounter undefined behavior. A common mistake is using <code>==</code> instead of <code>.equals()</code> for <a href=\"https://stackoverflow.com/a/513839\" target=\"_blank\" rel=\"noopener\">String comparison</a>, which will cause undefined behavior.</p>\n<p><strong>Python</strong></p>\n<p>First, check if you have any class variables and ensure they are initialized for each test case, not just once for the entire process.</p>\n<pre style=\"font-size: 13px;\">class DisjointSet:<br>    sets = {}     # This is only init once per process.<br>    longest = 0   # This is only init once per process.</pre>\n<p>For the example above, the class DisjointSet has two class variables and are not initialized for each test case and will cause unexpected behavior. The below code will initialize the class variables properly for each test case.</p>\n<pre style=\"font-size: 13px;\">class DisjointSet:<br>    # default constructor, init all member data.<br>    def __init__(self):<br>        self.sets = {}     # This is init for each test case.<br>        self.longest = 0   # This is init for each test case.</pre>\n<p>Another common pitfall is <a href=\"https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments\" target=\"_blank\" rel=\"noopener\">using mutable default arguments</a>. For example, a <a href=\"https://docs.python.org/3/tutorial/datastructures.html#more-on-lists\" target=\"_blank\" rel=\"noopener\">list</a> or a <a href=\"https://docs.python.org/3/tutorial/datastructures.html#dictionaries\" target=\"_blank\" rel=\"noopener\">dict</a> are mutable objects, but a <a href=\"https://docs.python.org/3/library/string.html\" target=\"_blank\" rel=\"noopener\">string</a> is an immutable object. As shown below, the user uses a list <code>combinations</code> as the default argument to a function causing unexpected behavior. Besides causing unexpected behavior, this is an <a href=\"https://docs.quantifiedcode.com/python-anti-patterns/correctness/mutable_default_value_as_argument.html\" target=\"_blank\" rel=\"noopener\">anti-pattern</a> in the real world and you should avoid it.</p>\n<p><a href=\"https://support.leetcode.com/hc/article_attachments/360020803354/Generate_Parentheses_LeetCode.png\" target=\"_blank\" rel=\"noopener\"><img src=\"https://support.leetcode.com/hc/article_attachments/360020803354/Generate_Parentheses_LeetCode.png\" alt=\"Generate_Parentheses_LeetCode.png\" width=\"1337\" height=\"669\"></a></p>"},{"id":360011985633,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011985633.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011985633-I-forgot-my-password-How-do-I-reset-it","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":4,"vote_sum":-3,"vote_count":19,"upvote_count":8,"downvote_count":11,"section_id":360002895793,"created_at":"2018-11-10T01:06:06Z","updated_at":"2026-05-17T06:56:10Z","name":"I forgot my password. How do I reset it?","title":"I forgot my password. How do I reset it?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2022-11-17T23:00:15Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>On the <a href=\"https://leetcode.com/accounts/login\" target=\"_blank\" rel=\"noopener\">login page</a>, click on the \"Forgot Password?\" link to reset your password. Or you can go to <a href=\"https://leetcode.com/accounts/password/reset/\" target=\"_blank\" rel=\"noopener\">Reset Password</a> page directly to reset it.</p>\n<p class=\"wysiwyg-text-align-center\"><img src=\"https://support.leetcode.com/hc/article_attachments/360018614193/Screen_Shot_2018-11-09_at_5.04.49_PM.png\" alt=\"Screen_Shot_2018-11-09_at_5.04.49_PM.png\" width=\"347\" height=\"408\"></p>"},{"id":360011884274,"url":"https://leetcodehq.zendesk.com/api/v2/help_center/en-us/articles/360011884274.json","html_url":"https://support.leetcode.com/hc/en-us/articles/360011884274-Why-can-t-I-purchased-the-Complete-Edition-eBook","author_id":368453300473,"comments_disabled":true,"draft":false,"promoted":false,"position":4,"vote_sum":-22,"vote_count":24,"upvote_count":1,"downvote_count":23,"section_id":360002895973,"created_at":"2018-11-10T00:34:52Z","updated_at":"2026-06-08T22:00:08Z","name":"Why can't I purchased the Complete Edition eBook?","title":"Why can't I purchased the Complete Edition eBook?","source_locale":"en-us","locale":"en-us","outdated":false,"outdated_locales":[],"edited_at":"2018-12-27T07:29:32Z","user_segment_id":null,"permission_group_id":2491634,"body":"<p>The Complete Edition only covers the 10 exclusive questions from the <a href=\"https://leetcode.com/book/\" target=\"_blank\" rel=\"noopener\">eBook</a> and had been deprecated in favor of the new premium subscription. <span class=\"s1\">Please feel free to check our monthly/annual premium subscription to get more premium questions.</span></p>"}],"sort_by":"position","sort_order":"asc"}