For a given number k and a sequence s : a1, a2, . . . , an of n numbers, write an
Chapter 6, Problem 14(choose chapter or problem)
For a given number k and a sequence s : a1, a2, . . . , an of n numbers, write an algorithm that determines whether any term in s is within 1 of k.
Unfortunately, we don't have that question answered yet. But you can get it answered in just 5 hours by Logging in or Becoming a subscriber.
Becoming a subscriber
Or look for another answer