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

Method notInVisited

CountMoreThanN-K.java:27–36  ·  view source on GitHub ↗
(int visitedArray[],int element)

Source from the content-addressed store, hash-verified

25{
26 //Function to check if we have already seen an element or not.
27 public boolean notInVisited(int visitedArray[],int element)
28 {
29 // Iterate the visitedArray
30 for(int i=0;i<visitedArray.length;i++)
31 {
32 if(visitedArray[i] == element)
33 return false;
34 }
35 return true;
36 }
37
38 public int countOccurence(int[] arr, int n, int k)
39 {

Callers 1

countOccurenceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected