leetcode2-leetcode:leetcode

时间:2021-06-29 21:06:06
【文件属性】:
文件名称:leetcode2-leetcode:leetcode
文件大小:16KB
文件格式:ZIP
更新时间:2021-06-29 21:06:06
系统开源 leetcode 2 leetcode 这个仓库是 leetcode 问题的练习区。 它不仅关注解决,而且关注不同的解决方案。 此外,这个存储库主要用于 leetcode 上问题的不同实现。 关于解决方案和实现之间的不同,例如,遍历一棵树 1)DFS 和 BFS 被认为是两种不同的解决方案 2)递归DFS和堆栈DFS被认为是一种解决方案,但有两种不同的实现方式。 但是,它们都具有最佳时间复杂度和空间复杂度。 众所周知,面试的时候,对于一道题,要求比编程比赛高,在编程比赛中,我们只关心算法的复杂度和程序的正确性,但是在面试的时候,面试官经常会问其他的问题,尤其是关于不同的实现和解决方案。 比如他可能会问你不定义这个辅助变量能不能实现,把递归改成栈,不用两个队列就可以遍历,不用vector等等。 如果你像其他在线评委一样练习 leetcode,只需提交并被接受,然后将其扔掉,你就无法准备这些问题。 其实,不同于复杂性和正确性,实现和解决方案没有最好的和评判标准,比如你给面试官一个复杂度最好的算法,他可能不让你优化,当你给面试官一个最好的算法时,他可能不让你去优化。代码没有bug,他可能不让
【文件预览】:
leetcode-master
----Symmetric Tree.cpp(653B)
----Populating Next Right Pointers in Each Node II.cpp(1KB)
----Reverse Nodes in k-Group.cpp(2KB)
----Path Sum II.cpp(1KB)
----Binary Tree Level Order Traversal II.cpp(1KB)
----Binary Tree Maximum Path Sum.cpp(838B)
----Construct Binary Tree from Preorder and Inorder Traversal.cpp(1KB)
----Merge k Sorted Lists.cpp(1KB)
----Add Two Numbers.cpp(1KB)
----Remove Duplicates from Sorted List II.cpp(852B)
----Validate Binary Search Tree.cpp(1KB)
----Flatten Binary Tree to Linked List.cpp(681B)
----Sum Root to Leaf Numbers.cpp(733B)
----Populating Next Right Pointers in Each Node.cpp(1KB)
----Remove Nth Node From End of List.cpp(784B)
----Partition List.cpp(985B)
----Binary Tree Level Order Traversal.cpp(1KB)
----Construct Binary Tree from Inorder and Postorder Traversal.cpp(1KB)
----Reverse Linked List II.cpp(1KB)
----Rotate List.cpp(899B)
----Swap Nodes in Pairs.cpp(699B)
----Convert Sorted List to Binary Search Tree.cpp(1KB)
----Remove Duplicates from Sorted List.cpp(666B)
----README.md(2KB)
----Binary Tree Zigzag Level Order Traversal.cpp(1KB)
----Merge Two Sorted Lists.cpp(2KB)
----Convert Sorted Array to Binary Search Tree.cpp(673B)

网友评论