Beta

Find a cycle

Description
Loading description...
Algorithms
  • Please sign in or sign up to leave a comment.
  • Voile Avatar

    Expected and actual values are flipped.

  • Voile Avatar

    What if there are multiple possible answers?

    Edit: Even the first test case has multiple possible answers, and yet there are no specifications on which one should be returned.

  • LesRamer Avatar

    When I encountered this puzzle, I suspected the goal was to find a cycle in a linked-list. This problem involves graphs -- which is definitely more challenging. I think you should strongly consider adding "graph" either in the title, the description or both.

  • myjinxin2015 Avatar
    namespace Bank {
      using System;
      public class Account
      {
        private decimal balance;
        public void Deposit(decimal amount)
        {
        }
    
        public void Withdraw(decimal amount)
        {
        }
    
        public void TransferFunds(Account destination, decimal amount)
        {
          
        }
    
        public decimal Balance { get { return balance; } }
      }
    }
    

    These seem to have nothing to do with Kata?