Golden Award for Technetium 2019 Challenge

This was an interesting challenge for me, first of all because C# was not offered as an option for solving the problem and the problem itself was a nice brain puzzle. I managed to solve this with Java and GoLang

TecheniumChallengeResult.png

This is the problem description:
You are given a matrix A consisting of N rows and M columns, where each cell contains a digit. Your task is to find a continuous sequence of neighbouring cells, starting in the top-left corner and ending in the bottom-right corner (going only down and right), that creates the biggest possible integer by concatenation of digits on the path. By neighbouring cells we mean cells that have exactly one common side.

Write a function:

class Solution { public String solution(int[][] A); }

that, given matrix A consisting of N rows and M columns, returns a string which represents the sequence of cells that we should pick to obtain the biggest possible integer.

For example, given the following matrix A:

[9 9 7]
       [9 7 2]
       [6 9 5]
       [9 1 2]

the function should return “997952”, because you can obtain such a sequence by choosing a path as shown below:

[9 9 *]
       [* 7 *]
       [* 9 5]
       [* * 2]

Write an efficient algorithm for the following assumptions:

  • N and M are integers within the range [1..1,000];
  • each element of matrix A is an integer within the range [1..9].
The challenge is still open so you can try it on the following link:
Based on the results of the solution here is my certificate
Technetium2019Challenge.png
Happy coding,
J.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s