I'm getting a WA on problem 101. I'll paste my code and some sample inputs and outputs. import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.Scanner;
class Main {
private static Map<Integer, Integer> posMap = new HashMap<Integer ...
I'm getting a wrong answer on Problem 100. Before you ask, yes, I did consider that j < i. I've tested it and it works fine. It works with all of the given samples. Here is my code. #include <iostream>
using namespace std;
int main () { int i, j, maxLength = 0, temp, count, swap;