View gist:62cc50f9c41be675f1d046a5b9f8db1f
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(); | |
} |
View Min Steps in Infinite GridBookmark Suggest Edit
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; |