In Informatica Cloud, when detecting duplicate records using a sorted input, which algorithm approach has the best time efficiency?
-
A
Compare all pairs in O(n²)
-
B
Sort then scan adjacent pairs in O(n log n)
-
C
Use a trie for O(nĀ·k)
-
D
Use DFS in O(V+E)