We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
/* * Complete the 'connectingTowns' function below. * * The function is expected to return an INTEGER. * The function accepts following parameters: * 1. INTEGER n * 2. INTEGER_ARRAY routes */funcconnectingTowns(nint32,routes[]int32)int32{mod:=int64(1234567)result:=int64(1)for_,route:=rangeroutes{result=(result*int64(route))%mod}returnint32(result)}
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
An unexpected error occurred. Please try reloading the page. If problem persists, please contact support@hackerrank.com
Connecting Towns
You are viewing a single comment's thread. Return to all comments →
golang solution