7 kyu

Consecutive items

2,896 of 7,534LogicalX

Description:

You are given a list of unique integers arr, and two integers a and b. Your task is to find out whether or not a and b appear consecutively in arr, and return a boolean value (True if a and b are consecutive, False otherwise).

It is guaranteed that a and b are both present in arr.

Fundamentals

More By Author:

Check out these other kata created by LogicalX

Stats:

CreatedSep 25, 2020
PublishedSep 25, 2020
Warriors Trained10633
Total Skips194
Total Code Submissions21586
Total Times Completed7534
Python Completions2896
C Completions313
JavaScript Completions3294
Haskell Completions93
C# Completions412
Clojure Completions40
Ruby Completions183
C++ Completions565
COBOL Completions9
λ Calculus Completions8
Total Stars70
% of votes with a positive feedback rating93% of 1047
Total "Very Satisfied" Votes918
Total "Somewhat Satisfied" Votes107
Total "Not Satisfied" Votes22
Total Rank Assessments55
Average Assessed Rank
7 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • LogicalX Avatar
  • anter69 Avatar
  • Chrono79 Avatar
  • JohanWiltink Avatar
  • nekokat Avatar
  • rowcased Avatar
  • rsa Avatar
  • hobovsky Avatar
  • Fbasham Avatar
  • topping Avatar
  • Wisdou Avatar
  • akar-0 Avatar
Ad