Skip to content

Instantly share code, notes, and snippets.

View danielgoncharov's full-sized avatar

Daniel Goncharov danielgoncharov

  • New Work SE
  • Hamburg
View GitHub Profile
@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();
}
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;