Update DepthFirstSearch.java

This commit is contained in:
Abir Bhushan 2019-04-16 19:39:26 +01:00 committed by GitHub
parent 4d9965cb94
commit 785b570167
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ package src.main.java.com.search;
In comes, depth-first search In comes, depth-first search
* Worst-case performance O(n) * Worst-case performance O(n)
* Best-case performance O(1) * Best-case performance O(1)
* Average performance O(n) * Average performance O(n)
* *
* @author abir (https://github.com/abircb) * @author abir (https://github.com/abircb)
*/ */
@ -26,8 +26,8 @@ public class DepthFirstSearch {
*/ */
public static <T extends Comparable<T>> T find(T key, BinaryTree<T> tree) { public static <T extends Comparable<T>> T find(T key, BinaryTree<T> tree) {
return tree.get(key); return tree.get(key);
} }
} }