We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 871c2bc commit b8ae18eCopy full SHA for b8ae18e
binary-tree-level-order-traversal/Gotprgmer.java
@@ -24,7 +24,7 @@
24
// 시간복잡도 : O(N^2) -> 한쪽으로 치우친 트리일 경우 O(N)(index of) + T(N-1)이 될 수 있다.
25
// 위 식을 전개해보면 N + N-1 + N-2 + ... + 1 = N(N+1)/2 = O(N^2)
26
// 공간복잡도 : O(N) -> N길이의 리스트 크기
27
-class Solution {
+class SolutionGotprgmer {
28
public TreeNode buildTree(int[] preorder, int[] inorder) {
29
30
if(preorder.length == 0 || indexOf(inorder,preorder[0]) == -1){
0 commit comments