Skip to content

Instantly share code, notes, and snippets.

View azeemmohd's full-sized avatar

Azeem Mohammad azeemmohd

View GitHub Profile
@azeemmohd
azeemmohd / System Design.md
Created May 10, 2020 16:17 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@azeemmohd
azeemmohd / System Design.md
Created May 10, 2020 16:17 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
import java.util.ArrayList;
import java.util.List;
/**
*
* @author azeem
*
*/
public class TurtleStrawBerry {
बचपन मे ,
सुबह सुबह सब खिलखिलाते,
स्कूल जाते,
शाम को ख़ुशी ख़ुशी घर आते ,
रात मे बैटमैन बनने के, सपने पिरोते ।
जब से व्यसक हुए,
जीवन हमारा ऐसा
मानो पेंडुलम जैसा,
रोबोट की तरह दफ्तर जाते ,
थक, हार कर घर वापस आते ,
public static String doStuff(int n, int j, int k) {
String s = formN(n);
return s.substring(j, k+1);
}
private static String formN(int n) {
StringBuilder sb = new StringBuilder("");
for(int i = 0; i<=n; i++){
public static void sumOfNumsFormedByPaths(Node root, ArrayList<String> nums, String sb) {
if(root == null) {
return;
}
sb+=root.data;
if(root.right == null && root.left == null) {
nums.add(sb);
}