What is the big Oh of the following code snippet?

for(int i = 0; i < n; i++){
  for(int j = 0; j < n; j++){
    if(favorites[j] == i){
      return favorites[j];
    }
  }
}
O(n^2)
  • O(n)
  • O(j)
  • O(log n)

There are no hints for this question