leetcode答案-leetcode:leetcode

时间:2021-06-30 01:38:16
【文件属性】:
文件名称:leetcode答案-leetcode:leetcode
文件大小:95KB
文件格式:ZIP
更新时间:2021-06-30 01:38:16
系统开源 leetcode 答案 leetcode 08/18 Unique Paths 应该是简单的数学排列组合问题,提炼一下其实就一句话:有m个黑球,n个白球,有多少种不同的排列方式。 我数学太差,没找到答案,直接上了动态规划。 Unique Paths II mod之后,可能数学公式就不能简单地给出答案了。但对我来说,其实和前一题没区别。动态规划处理这种问题,早就是牛刀杀鸡了。。 Single Number 碰巧我知道异或的解法。如果不知道的话,想想还是有点费事的。 Maximum Depth of Binary Tree 这?也太简单了吧。。一行代码,一个尾递归搞定啊。。 终于想清楚了,leetcode的AC率应该是:在线编辑、肉眼检查,提交的准确率!借助线下debug工具,有何难度可言?丝毫没有模拟在线面试的味道了。。另外,时间也是个考核要素,但考虑到实际情况,感觉通常只要被面试者没有放弃,在合理的时间内,一般都可以继续,所以先这样吧。。 08/19 Same Tree 这种简单的二叉树遍历,丝毫没有难度啊。。 Insertion Sort List 在这里遇到前所未遇的惨败——提交了
【文件预览】:
leetcode-master
----Binary Tree Level Order Traversal()
--------BinaryTreeLevelOrderTraversal.py(1KB)
----Binary Tree Preorder Traversal()
--------BinaryTreePreorderTraversal.py(917B)
----Linked List Cycle II()
--------LinkedListCycleII.cpp(728B)
--------LinkedListCycleII.py(848B)
----Minimum Depth of Binary Tree()
--------MinimumDepthofBinaryTree.py(855B)
----Unique Paths II()
--------UniquePathsII.py(1015B)
----Insertion Sort List()
--------InsertionSortList.py(11KB)
--------InsertionSortList.cpp(12KB)
--------InsertionSortList(18KB)
----Linked List Cycle()
--------LinkedListCycleSFPointer.py(631B)
--------LinkedListCycle(7KB)
--------LinkedListCycle.py(5KB)
--------LinkedListCycle.cpp(832B)
--------LinkedListCycleSlowFastRunner.py(354B)
----Binary Tree Zigzag Level Order Traversal()
--------BinaryTreeZigzagLevelOrderTraversal.py(1KB)
----Validate Binary Search Tree()
--------ValidateBinarySearchTreeM.py(1KB)
--------ValidateBinarySearchTree.py(1KB)
----Sort List()
--------SortList(128KB)
--------SortList.cpp(62KB)
--------SortList.py(61KB)
----Unique Paths()
--------UniquePaths.py(2KB)
--------UniquePathsM.py(501B)
----Flatten Binary Tree to Linked List()
--------FlattenBinaryTreetoLinkedList.py(1KB)
----Balanced Binary Tree()
--------BalancedBinaryTree.py(2KB)
----Merge Two Sorted Lists()
--------MergeTwoSortedLists.py(1KB)
----Single Number II()
--------SingleNumberII.py(478B)
----Two Sum()
--------TwoSum.py(388B)
----Single Number()
--------SingleNumberReduce.py(109B)
--------SingleNumber.py(208B)
----Binary Tree Level Order Traversal II()
--------BinaryTreeLevelOrderTraversalII.py(1KB)
----Problems(sorted)(6KB)
----README.md(14KB)
----Unique Binary Search Trees()
--------UniqueBinarySearchTrees.py(841B)
----Remove Duplicates from Sorted List II()
--------RemoveDuplicatesfromSortedListII.py(1KB)
--------RemoveDuplicatesfromListII.py(2KB)
----Symmetric Tree()
--------SymmetricTree.py(1KB)
----Partition List()
--------PartitionList.py(1KB)
----Binary Tree Inorder Traversal()
--------BinaryTreeInorderTraversal.py(1KB)
--------BinaryTreeInorderTraversalM.py(921B)
----Maximum Depth of Binary Tree()
--------MaximumDepthofBinaryTree.py(645B)
----Add Two Numbers()
--------AddTwoNumbers.py(903B)
----Remove Nth Node From End of List()
--------RemoveNthNodeFromEndofList.py(955B)
----Same Tree()
--------SameTree.py(733B)
----Reverse Linked List II()
--------ReverseLinkedListII.py(1KB)
----Remove Duplicates from Sorted List()
--------RemoveDuplicatesfromList.py(837B)
--------RemoveDuplicatesfromSortedList.py(862B)
----Copy List with Random Pointer()
--------CopyListwithRandomPointer.py(2KB)
----Binary Tree Postorder Traversal()
--------BinaryTreePostorderTraversal.py(1KB)

网友评论