2016年2月24日

Kth Smallest Element in a BST

摘要: Given a binary search tree, write a function kthSmallest to find the kth smallest element in it. Note: You may assume k is always valid, 1 ≤ k ≤ BST's 阅读全文

posted @ 2016-02-24 21:45 walkwalkwalk 阅读(179) 评论(0) 推荐(0) 编辑

Path Sum II

摘要: Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum. For example:Given the below binary tree and sum 阅读全文

posted @ 2016-02-24 21:23 walkwalkwalk 阅读(173) 评论(0) 推荐(0) 编辑

Lowest Common Ancestor of a Binary Tree

摘要: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on Wikipedia: “The lowes 阅读全文

posted @ 2016-02-24 20:57 walkwalkwalk 阅读(191) 评论(0) 推荐(0) 编辑

逻辑回归

摘要: 本文参考了很多网页,主要有: http://blog.csdn.net/zouxy09/article/details/20319673 http://www.wbrecom.com/?p=394 http://www.cnblogs.com/EE-NovRain/p/3810737.html 下面 阅读全文

posted @ 2016-02-24 00:53 walkwalkwalk 阅读(3821) 评论(0) 推荐(2) 编辑

导航