leetcode答案-leetcode:leetcode

时间:2021-06-30 01:24:57
【文件属性】:
文件名称:leetcode答案-leetcode:leetcode
文件大小:133KB
文件格式:ZIP
更新时间:2021-06-30 01:24:57
系统开源 leetcode 答案 leetcode leetcode exercises,algorithms part! TwoSum: 1.key point: unorderd_map(16ms), map(24ms) 2.大概是前50%的样子,并不知道如何进一步提升性能 addTwoNums: 1.新建ListNode对象的时候没有分配存储空间导致bus error 2.原题设计上null pointer使用了NULL而不是nullptr 3.考虑将测试用例变成用户输入 4.考虑将在不同对象上的相同操作提炼为子函数 5.c++链表操作复习 Longest Substring Without Repeating Characters: 1.map内部根据键值红黑树排序,一开始以为根据插入时间排序导致错误 2.情况分为最长子串在字符串开头,中间,以及结尾,需要用不同的方式进行处理 3.tag中hash table没有用到,可能是提高效率的关键点?(不过感觉不是 4.代码还是不够优雅(嘤 String to Integer (atoi): 1.没有考虑到很多很多情况,比如溢出,字符串不是单纯的
【文件预览】:
leetcode-master
----BinaryTreeLevelOrderTraversal.cpp(2KB)
----btot(138KB)
----binarySearchTreeIterator.cpp(2KB)
----container.cpp(3KB)
----MinimumGeneticMutation.cpp(2KB)
----searchMatrix.cpp(2KB)
----container(53KB)
----lowestCommonAncestorofaBinarySearchTree.cpp(2KB)
----maxDepthofBinaryTree.cpp(997B)
----binaryTreeZigzagLevelOrderTraversal.cpp(3KB)
----maxLength(27KB)
----btzlot(81KB)
----BinaryTreePreorderTraversal.cpp(708B)
----VerifyPreorderSerializationofaBinaryTree.java(1KB)
----MinimumGeneticMutation(80KB)
----invertBinaryTree.cpp(1KB)
----SymmetricTree.cpp(1KB)
----minimumDepthofBinaryTree.cpp(997B)
----SearchInsertPosition(1KB)
----bbt(39KB)
----HouseRobber.java(1KB)
----TwoSum.cpp(542B)
----UniqueBinarySearch1.cpp(1KB)
----binaryTreeLevelOrderTraversal2.cpp(3KB)
----RemoveDuplicatesfromSortedArray.cpp(673B)
----addTwoNums.cpp(4KB)
----missingnumber(27KB)
----binaryTreeRightSideView.cpp(1KB)
----quicksort(24KB)
----maxLength.cpp(1KB)
----3Sum.cpp(1KB)
----README.md(5KB)
----quicksort.cpp(1KB)
----Missingnumber.cpp(829B)
----convertSortedArraytoBinarySearchTree.cpp(1KB)
----balancedBinaryTree.cpp(2KB)
----flattenBinaryTreetoLinkedList.cpp(1KB)
----containerWithMostWater.java(2KB)
----sameTree.cpp(1KB)
----constructBinaryTreefromPreorderandInorderTraversal.cpp(2KB)
----longestSubstring.cpp(2KB)
----InorderTraversal.cpp(2KB)
----atoi.cpp(2KB)
----CombinationSum.cpp(2KB)

网友评论