TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Deer Park
NA
39
0
Logic to check 3 consecutive sequence
Nov 1 2012 11:52 PM
So, I have a list of integers say -
set one - 1,2,3,22,34,21
set two - 2,4,5,3,7,8
set three - 5,9,8,1,2,3
I have a function which should return true or false based on if the list contains consecutive three sequence number. So the set one and set three mentioned above should return true if passed to the function since those set have 3 numbers in sequence consecutively.
What the elegent way to do this? is it better to do it by checking each element of the array or is there a way to get this using Linq?
Please suggest.
Reply
Answers (
6
)
How can i disable back button from Child page of a master page
Regarding allignments of word document generated by ado.net