MCPcopy Create free account
hub / github.com/Tiwarishashwat/InterviewCodes / gardenNoAdj

Method gardenNoAdj

FlowerPlantingWithNoAdjacent.java:2–6  ·  view source on GitHub ↗
(int n, int[][] paths)

Source from the content-addressed store, hash-verified

1class Solution {
2 public int[] gardenNoAdj(int n, int[][] paths) {
3 int output[] = new int[n];
4 boolean ans=backtrack(1,paths,output,n+1);
5 return output;
6 }
7
8 public boolean backtrack(int garden,int path[][], int output[],int n)
9 {

Callers

nothing calls this directly

Calls 1

backtrackMethod · 0.95

Tested by

no test coverage detected