小小程序媛 |
|
||
得之坦然,失之淡然,顺其自然,争其必然 |
2015年12月3日
摘要:
题目Given a singly linked list, determine if it is a palindrome.Follow up: Could you do it in O(n) time and O(1) space?分析判断一个链表是否为回文。要求时间复杂度O(n... 阅读全文
摘要:
题目分析交换二叉树的左右子树。递归非递归两种方法实现。AC代码class Solution {public: //递归实现 TreeNode* invertTree(TreeNode* root) { if (!root) retur... 阅读全文
摘要:
阅读全文
摘要:
题目Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice... 阅读全文
|
Copyright © 2024 Coding菌
Powered by .NET 9.0 on Kubernetes |