Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by hj1

  1. hj1

    Java flatten binary tree to linked list

    what does flatten recursion statements specifically do here flatten{ if (root==null) return; TreeNode right = root.right; flatten(root.left); root.right = root.left; root.left = null; while(root.right!=null){ root = root.right; flatten(right); root.right = right;}
Back
Top Bottom