MCPcopy Create free account
hub / github.com/Rohit91singh9/Coding-DP-DSA / main

Method main

bestCombos.java:5–23  ·  view source on GitHub ↗
(String args[])

Source from the content-addressed store, hash-verified

3import java.util.*;
4class bestCombos {
5 public static void main(String args[])
6 {
7 Scanner sc=new Scanner(System.in);
8
9 int n=sc.nextInt();
10
11 int popularity[]=new int[n];
12 //input the array
13 for(int i=0;i<n;i++)
14 popularity[i]=sc.nextInt();
15
16 int k=sc.nextInt();
17
18 int combo[]=bestCombo(popularity,k);
19
20 for(int i=0;i<combo.length;i++)
21 System.out.println(combo[i]);
22
23 }
24
25 public static int[] bestCombo(int popularity[],int k)
26 {

Callers

nothing calls this directly

Calls 1

bestComboMethod · 0.95

Tested by

no test coverage detected