Skip to content

Commit

Permalink
Python XML!
Browse files Browse the repository at this point in the history
  • Loading branch information
snehalmastud authored Feb 23, 2020
1 parent 9c24227 commit 8ec6bef
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions XML/XML 2- Find the Maximum Depth/Solution.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

maxdepth = 0


def depth(elem, level):
global maxdepth
if (level == maxdepth):
maxdepth += 1

for child in elem:
depth(child, level + 1)




0 comments on commit 8ec6bef

Please sign in to comment.