Evaluate the efficiency of algorithms by quantifying their time and space resource requirements as data scales.
Write two different functions to find duplicates in an array (one using nested loops, one using a hash set) and mathematically prove their differing Big O complexities.