Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 3e1376d

Browse files
author
Amogh Singhal
authored
Update and rename find_second_largest.py to find_second_largest_in_binary_tree.py
1 parent 723bd3b commit 3e1376d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎find_second_largest.py‎ renamed to ‎find_second_largest_in_binary_tree.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# Given a binary tree, find the second largest
2+
# node in it
13

24
class Node:
35
def __init__(self, data):
@@ -35,4 +37,4 @@ def find_second_largest(root):
3537
node.right.right = Node(100)
3638

3739
result = find_second_largest(node)
38-
print(result)
40+
print(result)# prints 50

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /