Deloitte interview question

sub array with given sum k.