Levels Tought:
Elementary,Middle School,High School,College,University,PHD
Teaching Since: | May 2017 |
Last Sign in: | 305 Weeks Ago, 5 Days Ago |
Questions Answered: | 66690 |
Tutorials Posted: | 66688 |
MCS,PHD
Argosy University/ Phoniex University/
Nov-2005 - Oct-2011
Professor
Phoniex University
Oct-2001 - Nov-2016
Please help, I am stuck. Need to write a Java method that:
Returns the first index of the longest repeating sequence of x in input
public static int firstIndexOfLongestRepeatingInteger(int[] input, int x) {
//implement
}
*For example, if input = {0,0,1,1,1,0,1} and x = 1, then output = 2
Another Method that:
public static int subsequenceStart(int[] sequence, int[] subsequence) {
     // implement
  }
Returns the first index where the subsequence is found in sequence
*You can assume subsequence.length < sequence.length
*You can assume subsequence is in sequence
Answer needs to only use basic things like for loops, while, do-while. This is for a beginner's Java Class.
Thanks!
Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll