摘要:
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/ Given an array of integers that i 阅读全文
摘要:
Difficulty: Easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/two-sum/ Given an array of integers, return indices of the two num 阅读全文
摘要:
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/reverse-linked-list/ Reverse a singly linked list. Example: Follow 阅读全文
摘要:
Difficulty:medium More:【目录】LeetCode Java实现 Description Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the 阅读全文
摘要:
Difficulty:medium More:【目录】LeetCode Java实现 Description Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the 阅读全文
摘要:
Difficulty:medium More:【目录】LeetCode Java实现 Description Given an array nums containing n + 1 integers where each integer is between 1 and n(inclusive), 阅读全文
摘要:
Difficulty:medium More:【目录】LeetCode Java实现 Description Given a linked list, return the node where the cycle begins. If there is no cycle, return null. 阅读全文
摘要:
这里记录一下自己刷的LeetCode题目。 有些博客用英文阐述自己的思路和收获,相当于练习一下英文的表达能力。 比较好的题目有加粗。 题目以后将按题型分类,可以从目录寻找相关的分类。 数组 简单题 26. Remove Duplicates from Sorted Array 122. Best T 阅读全文
摘要:
Difficulty:easy More:【目录】LeetCode Java实现 Description https://leetcode.com/problems/linked-list-cycle/ Given a linked list, determine if it has a cycle 阅读全文
摘要:
本文参考自《剑指offer》一书,代码采用Java语言。 更多:《剑指Offer》Java实现合集 题目 输入两个树结点,求它们的最低公共祖先。 思路 该题首先要和面试官确定是否为二叉树,得到肯定答复后,还要确定是否为二叉搜索树,是否有父指针,或者仅仅是普通二叉树。 1.树为二叉搜索树时,最低公共祖 阅读全文