NeetCode #423LC-450MediumTreesNC 250
← Back to All Problems

#423 · #450 · Delete Node in a BST(删除二叉搜索树中的节点)

📌 Problem Statement & Constraints

Given the root of a binary search tree and a key, delete the node with that key and return the root. The tree must remain a valid BST. Constraints: the number of nodes is in [0, 10^4], -10^5 <= Node.val <= 10^5; values are unique.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!