題目描述 Given a binary search tree (BST), find the lowest common ancestor (...
![240](https://upload.jianshu.io/collections/images/1726213/%E6%9C%AA%E5%91%BD%E5%90%8D1551351318.png?imageMogr2/auto-orient/strip|imageView2/1/w/240/h/240)
題目描述 Given a binary search tree (BST), find the lowest common ancestor (...
題目描述 Given an array of integers, find if the array contains any duplicat...
題目描述 Given an integer, write a function to determine if it is a power of...
題目描述 Write a function to delete a node (except the tail) in a singly lin...
題目描述 給定一個鏈表撒穷,返回鏈表開始入環(huán)的第一個節(jié)點瓮孙。 如果鏈表無環(huán),則返回 null贡必。 為了表示給定鏈表中的環(huán),我們使用整數(shù) pos 來表示鏈...
題目描述 You are playing the following Nim Game with your friend: There is a...
題目描述 實現(xiàn) strStr() 函數(shù)。 給定一個 haystack 字符串和一個 needle 字符串吠谢,在 haystack 字符串中找出 n...
題目描述 編寫一個程序,找到兩個單鏈表相交的起始節(jié)點唯袄。 如下面的兩個鏈表: 在節(jié)點 c1 開始相交弯屈。 示例 1: 輸入:intersectVal...
題目描述 Given an array nums of n integers where n > 1, return an array out...
題目描述 Determine whether an integer is a palindrome. An integer is a palin...