Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Goncharov danielgoncharov

  • New Work SE
  • Hamburg
View GitHub Profile
View gist:62cc50f9c41be675f1d046a5b9f8db1f
@UserScope class ReceiveMessageUseCase @Inject constructor(private val messagesLocalDataSource: ChatMessagesLocalDataSource){
fun doMagic():Completable
}
class ComponentA @Inject constructor(private val receiveMessageUseCase: ReceiveMessageUseCase){
fun doStuff():Completable=
receiveMessageUseCase.doMagic();
}
View Min Steps in Infinite GridBookmark Suggest Edit
public class Solution {
// X and Y co-ordinates of the points in order.
// Each point is represented by (X.get(i), Y.get(i))
public int coverPoints(ArrayList<Integer> X, ArrayList<Integer> Y) {
if(X.size()<=1 || Y.size()<=1){
return 0;
}
int steps=0;
int startingPoint = 0;