7 kyu

Largest 5 digit number in a series

11,162 of 29,116jhoffner

Description:

In the following 6 digit number:

283910

91 is the greatest sequence of 2 consecutive digits.

In the following 10 digit number:

1234567890

67890 is the greatest sequence of 5 consecutive digits.

Complete the solution so that it returns the greatest sequence of five consecutive digits found within the number given. The number will be passed in as a string of only digits. It should return a five digit integer. The number passed may be as large as 1000 digits.

Adapted from ProjectEuler.net

Algorithms

Stats:

CreatedApr 12, 2013
PublishedApr 12, 2013
Warriors Trained58202
Total Skips8963
Total Code Submissions128269
Total Times Completed29116
JavaScript Completions11162
CoffeeScript Completions197
Ruby Completions2629
Haskell Completions568
Python Completions9007
Dart Completions808
C# Completions1191
PHP Completions980
Elixir Completions230
Java Completions1591
C++ Completions831
C Completions385
Rust Completions395
Crystal Completions16
COBOL Completions13
Julia Completions19
Total Stars638
% of votes with a positive feedback rating88% of 3195
Total "Very Satisfied" Votes2542
Total "Somewhat Satisfied" Votes550
Total "Not Satisfied" Votes103
Ad
Contributors
  • jhoffner Avatar
  • bkaes Avatar
  • GiacomoSorbi Avatar
  • adam-tokarski Avatar
  • lessonteacher Avatar
  • andreasWallner Avatar
  • donaldsebleung Avatar
  • llamatarianism Avatar
  • Chrono79 Avatar
  • imjasonmiller Avatar
  • kazk Avatar
  • Voile Avatar
  • Souzooka Avatar
  • clcraig Avatar
  • user1799785 Avatar
  • hobovsky Avatar
  • ejini战神 Avatar
  • akar-0 Avatar
  • JanMajor Avatar
Ad