added k balanced tree algo