Any Swift developers here have any experiences with using a queue data structure during an interview?
I know I can mimic a queue using an array, append and removeFirst. (Which I have been doing for LC problems)
e.g.
var arr = [1,2,3,4,5]
arr.append(6)
arr.removeFirst()
the problem is that removeFirst is an O(n) operation and not O(1)
https://developer.apple.com/documentation/swift/array/2884646-removefirst
Is it ok to just mention this to the interviewer and make an assumption that removeFirst is an O(1) operation? Or mention a hypothetical situation where there is an already existing implementation of Queue