Skip to content

dybek/confitura-2015-invertbinarytree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##Running Project use gradle wrapper to build. File /src/test/java/pl/astrait/invertbinarytree/TreeTest.java contains junit test. You can run test using:

gradlew test

Invert a Binary Tree

Invert a binary tree.

     1
   /   \
  2     3
 / \   / \
4   5 6   7

to

     1
   /   \
  3     2
 / \   / \
7   6 5   4

Data structures:

Scala:

case class TreeNode(value: Int, left: Option[TreeNode], right: Option[TreeNode])

Java:

public class TreeNode {
    int val;
    TreeNode left;
    TreeNode right;
    TreeNode(int x) { val = x; }
}

You can check contest bye-laws here.

Check out our Confitura 2015 site here

We are hiring! Visit our career site.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%