I'm trying to port this c# function to b4a. I'm having a problem with the
highlighted line, any suggestions?
private void combinationUtil(int[] arr, int[] data, int start, int end, int index, int r)
{
highlighted line, any suggestions?
private void combinationUtil(int[] arr, int[] data, int start, int end, int index, int r)
{
if (index == r)
{
for (int i = start; i <= end && end - i + 1 >= r - index; i++)
{
}{
string a = "";
for (int j = 0; j < r; j++)
if (data[j] < 10)
a += "0" + Convert.ToString(data[j]) + " ";
else
a += Convert.ToString(data[j]) + " ";
combos.Add(a);
return;
}for (int j = 0; j < r; j++)
if (data[j] < 10)
a += "0" + Convert.ToString(data[j]) + " ";
else
a += Convert.ToString(data[j]) + " ";
combos.Add(a);
return;
for (int i = start; i <= end && end - i + 1 >= r - index; i++)
{
data[index] = arr;
combinationUtil(arr, data, i + 1, end, index + 1, r);
} combinationUtil(arr, data, i + 1, end, index + 1, r);
Last edited: