# Definition for a binary tree node.

# class TreeNode:

# def **init**(self, x):

# self.val = x

# self.left = None

# self.right = None

class Solution:

# @param {TreeNode} root

# @return {integer[][]}

def levelOrder(self, root):

res,next = [],[]

if root:

temp = [root]

else:

return res

res.append(temp)

while 1:

for v in temp:

if v.left:

next.append(v.left)

if v.right:

next.append(v.right)

if not next:

break

res.append(next)

temp = next

next= []

q=[[v.val for v in x] for x in res]

return q[::-1]

i get Line 42: AttributeError: Solution instance has no attribute 'levelOrderBottom'