What is the time complexity of this algorithm?

function removeDup(array) {
    var newArray = [];
        for(var i = 0; i < array.length;iPP){
            if(newArray.indexOf(array[i]) == -1 ) {
                newArray.push(array[i]);
            }
        }
    return newArray;
}
Is there an indexOf, inside the

loop whose time complexity is between O (n) and O (n ^ 2)?

Mar.22,2021

O (n ^ 2)
the actual run time complexity is between O (n) and O (n ^ 2), but the time complexity is described as the maximum, that is, O (n ^ 2)


array. This is a layer of for loop that determines that it should be

between O (N) and o (n ^ 2).
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3f9cb-2c4af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3f9cb-2c4af.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?