摘要:
题目来源:leetcode 题目描述: Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. According to the definition of LCA on W 阅读全文
摘要:
deep copy的意思我觉得就是复制一个对象成为新的对象,和原来的对象有不同的内存地址,不是简单的引用复制。 题目来源:leetcode 题目描述: Copy List with Random Pointer A linked list is given such that each node c 阅读全文
摘要:
问题来源:leetcode 问题描述: Given an input string, reverse the string word by word. 想法就是用split函数,但是你会发现数组是没有倒转函数的,要么用循环倒转。要么转化成list调用Collections.reverse 这个时候又 阅读全文
摘要:
数组移步转载:https://blog.csdn.net/shijing_0214/article/details/53056943 题目来源:leetcode 2019-03-17 题目描述:Given a linked list, rotate the list to the right by 阅读全文