GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — LeetCode/Tree/270.Closest-Binary-Search-Tree-Value at master · wisdompeak/LeetCode

Expand file tree

/

270.Closest-Binary-Search-Tree-Value

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

270.Closest-Binary-Search-Tree-Value

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
270.Closest Binary Search Tree Value.cpp
270.Closest Binary Search Tree Value.cpp
 
 
Readme.md
Readme.md
 
 

Readme.md

270.Closest-Binary-Search-Tree-Value

利用BST的性质不断朝target搜索,直至最底层。记录一路经过的根节点,不断更新 (root->val - target)的最小结果。

注意:result的初始值必须设置为root->val。

Leetcode Link

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.