Sakshi Singh
1 min readDec 28, 2018

HACKERRANK SOLUTION: Connecting Towns

//COPY PASTE THIS PART OF CODE IN THE PROVIDED BLANK SPACE IN YOUR EDITOR….

static int connectingTowns(int n, int[] routes) {

int l = routes.length;

int res= 1;

for(int i=0;i<l;i++)

{

res = (res * routes[i] % 1234567);

}

return res;

}

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Sakshi Singh
Sakshi Singh

Responses (1)

Write a response