This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |