Horje
java to kotlin online convertor Code Example
convert java code to kotlin online converter
Select the src/main/java folder in the project and choose 
	Code->"Convert Java File to Kotlin File”
java to kotlin online convertor
static int uniquePathsWithObstacles(int[][] A)
{

	int r = 2, c = 2;

	// create a 2D-matrix and initializing
	// with value 0
	int[][] paths = new int[r][c];
	for(int i = 0; i < r; i++)
	{
	for(int j = 0; j < c; j++)
	{
		paths[i][j] = 0;
	}
	}

	// Initializing the left corner if
	// no obstacle there
	if (A[0][0] == 0)
	paths[0][0] = 1;

	// Initializing first column of
	// the 2D matrix
	for(int i = 1; i < r; i++)
	{
	// If not obstacle
	if (A[i][0] == 0)
		paths[i][0] = paths[i - 1][0];
	}

	// Initializing first row of the 2D matrix
	for(int j = 1; j < c; j++)
	{

	// If not obstacle
	if (A[0][j] == 0)
		paths[0][j] = paths[0][j - 1];
	}

	for(int i = 1; i < r; i++)
	{
	for(int j = 1; j < c; j++)
	{

		// If current cell is not obstacle
		if (A[i][j] == 0)
		paths[i][j] = paths[i - 1][j] +
		paths[i][j - 1];
	}
	}

	// Returning the corner value
	// of the matrix
	return paths[r - 1][c-1];
}
convert kotlin to java online
Tools -> Kotlin -> Show Kotlin Bytecode 




Java

Related
android studio go to another activity kotlin Code Example android studio go to another activity kotlin Code Example
do i have to import files from the same package in java Code Example do i have to import files from the same package in java Code Example
media style dependency androidx Code Example media style dependency androidx Code Example
what is the command used to retrieve the java files along with the string existence hello word in it Code Example what is the command used to retrieve the java files along with the string existence hello word in it Code Example
java Overridding example Code Example java Overridding example Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7