Skip to content

Extra < and > wrapped around hyperlink #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
icelam opened this issue Apr 7, 2025 · 0 comments · Fixed by #7
Closed

Extra < and > wrapped around hyperlink #5

icelam opened this issue Apr 7, 2025 · 0 comments · Fixed by #7

Comments

@icelam
Copy link
Owner

icelam commented Apr 7, 2025

The generation result of 1123. Lowest Common Ancestor of Deepest Leaves is found to have extra < and > wrapped around a hyperlink.

Here is the link to generation result:
https://t.me/LeetcodeQustionOfToday/1235

The full JSON response body of API:

{
    "data": {
        "activeDailyCodingChallengeQuestion": {
            "link": "/problems/lowest-common-ancestor-of-deepest-leaves/",
            "date": "2025-04-04",
            "question": {
                "questionFrontendId": "1123",
                "title": "Lowest Common Ancestor of Deepest Leaves",
                "titleSlug": "lowest-common-ancestor-of-deepest-leaves",
                "content": "<p>Given the <code>root</code> of a binary tree, return <em>the lowest common ancestor of its deepest leaves</em>.</p>\n\n<p>Recall that:</p>\n\n<ul>\n\t<li>The node of a binary tree is a leaf if and only if it has no children</li>\n\t<li>The depth of the root of the tree is <code>0</code>. if the depth of a node is <code>d</code>, the depth of each of its children is <code>d + 1</code>.</li>\n\t<li>The lowest common ancestor of a set <code>S</code> of nodes, is the node <code>A</code> with the largest depth such that every node in <code>S</code> is in the subtree with root <code>A</code>.</li>\n</ul>\n\n<p>&nbsp;</p>\n<p><strong class=\"example\">Example 1:</strong></p>\n<img alt=\"\" src=\"https://s3-lc-upload.s3.amazonaws.com/uploads/2018/07/01/sketch1.png\" style=\"width: 600px; height: 510px;\" />\n<pre>\n<strong>Input:</strong> root = [3,5,1,6,2,0,8,null,null,7,4]\n<strong>Output:</strong> [2,7,4]\n<strong>Explanation:</strong> We return the node with value 2, colored in yellow in the diagram.\nThe nodes coloured in blue are the deepest leaf-nodes of the tree.\nNote that nodes 6, 0, and 8 are also leaf nodes, but the depth of them is 2, but the depth of nodes 7 and 4 is 3.</pre>\n\n<p><strong class=\"example\">Example 2:</strong></p>\n\n<pre>\n<strong>Input:</strong> root = [1]\n<strong>Output:</strong> [1]\n<strong>Explanation:</strong> The root is the deepest node in the tree, and it&#39;s the lca of itself.\n</pre>\n\n<p><strong class=\"example\">Example 3:</strong></p>\n\n<pre>\n<strong>Input:</strong> root = [0,1,3,null,2]\n<strong>Output:</strong> [2]\n<strong>Explanation:</strong> The deepest leaf node in the tree is 2, the lca of one node is itself.\n</pre>\n\n<p>&nbsp;</p>\n<p><strong>Constraints:</strong></p>\n\n<ul>\n\t<li>The number of nodes in the tree will be in the range <code>[1, 1000]</code>.</li>\n\t<li><code>0 &lt;= Node.val &lt;= 1000</code></li>\n\t<li>The values of the nodes in the tree are <strong>unique</strong>.</li>\n</ul>\n\n<p>&nbsp;</p>\n<p><strong>Note:</strong> This question is the same as 865: <a href=\"https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/\" target=\"_blank\">https://leetcode.com/problems/smallest-subtree-with-all-the-deepest-nodes/</a></p>\n",
                "isPaidOnly": false,
                "difficulty": "Medium",
                "topicTags": [
                    {
                        "name": "Hash Table",
                        "slug": "hash-table"
                    },
                    {
                        "name": "Tree",
                        "slug": "tree"
                    },
                    {
                        "name": "Depth-First Search",
                        "slug": "depth-first-search"
                    },
                    {
                        "name": "Breadth-First Search",
                        "slug": "breadth-first-search"
                    },
                    {
                        "name": "Binary Tree",
                        "slug": "binary-tree"
                    }
                ],
                "stats": "{\"totalAccepted\": \"140.5K\", \"totalSubmission\": \"189.2K\", \"totalAcceptedRaw\": 140541, \"totalSubmissionRaw\": 189232, \"acRate\": \"74.3%\"}",
                "hints": [
                    "Do a postorder traversal.",
                    "Then, if both subtrees contain a deepest leaf, you can mark this node as the answer (so far).",
                    "The final node marked will be the correct answer."
                ]
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant