Код: Выделить всё
class Solution {
class City{
int city;
long time;
City(int c, long t){
city = c;
time = t;
}
}
public int countPaths(int n, int[][] roads) {
ArrayList graph = new ArrayList();
for(int i=0; i (a.time - b.time));
^
reason: cannot infer type-variable(s) E
(argument mismatch; bad return type in lambda expression
possible lossy conversion from long to int)
where E is a type-variable:
E extends Object declared in class PriorityQueue
Вопрос из вопроса Leetcode 1976 года. Количество способов добраться до пункта назначения.
Подробнее здесь: https://stackoverflow.com/questions/791 ... iorityqueu
Мобильная версия