+ 1

A = [ 2, 4, 5, 7 ]. B = [ 1, 2, 6, 7].

Create a program to determine a smallest positive integer (not zero), which not included in both array variable! Do you mind helping me a little bit guys? Thank you

11th Sep 2019, 11:24 AM
Radendy Bahtiar
Radendy Bahtiar - avatar
2 ответов
+ 3
I can think of this: 1. iterate from 1 to infinity 1.1. Check membership of A 1.2. If false, check membership of B 1.3. If false, you're done. Else, repeat.
11th Sep 2019, 11:26 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
0
Very helpful. Thank you man
11th Sep 2019, 11:40 AM
Radendy Bahtiar
Radendy Bahtiar - avatar