Skip to content

Instantly share code, notes, and snippets.

View bassemZohdy's full-sized avatar

Bassem Reda Zohdy bassemZohdy

View GitHub Profile
//"abc" "bc" -> [ 0 ]
//"abc" "c" -> [ 0, 1 ]
//"abac" -> "aac" -> [ 1 ]
//"aabc" -> "abc" -> [ 0 ] *or* [ 1 ]
public static List getDeletedChar(String a, String b) {
List results = new ArrayList();
int charIndex;
int cursorPos = 0;
for (int i = 0; i < b.length(); i++) {