java - Time complexity of given code ?subarray sum -


public static void print(int arr[],string s,int j,int sum,int num){     if(num==sum&&s.length()==6){         system.out.println(s.substring(1));     }     if(j==arr.length){         return;     }     for(int i=j;i<arr.length;i++){         print(arr, s+" "+arr[i], i+1, sum+arr[i], num);     } } public static void findtriplet(int[] arr, int x){   print(arr, "", 0, 0,x); 

} find time complexity of code, question find subarray of given array sum k can have duplicates values


Comments

Popular posts from this blog

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -

python - Error while using APScheduler: 'NoneType' object has no attribute 'now' -