Faltec interview question

Stock count scenario