Skip to content

Instantly share code, notes, and snippets.

@vg22
vg22 / System Design.md
Created May 31, 2022 19:44 — 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?
<script>
$(document).ready(function() {
$("#getMessage").on("click", function(){
// Only change code below this line.
$(".message").html("Here is the message");
// Only change code above this line.
});
});
</script>
function rot13(str) { // LBH QVQ VG!
var i=0,j=0;var newstr=[];
while(i<str.length){
if(str.charCodeAt(i)>64&&str.charCodeAt(i)<78){
j=str.charCodeAt(i)+13;
newstr.push(String.fromCharCode(j));
function rot13(str) { // LBH QVQ VG!
var i=0,j=0;var newstr=[];
while(i<str.length){
if(str.charCodeAt(i)>64&&str.charCodeAt(i)<78){
//(str.charCodeAt(i)<77){
//newstr[i]=str.charCodeAt(i)+13;
j=str.charCodeAt(i)+13;
//console.log(j);
function mutation(arr) {
var a=arr[0].toLowerCase().split("");
var b=arr[0].toLowerCase().split("");
var i=0;
for (i in b){
if(a.indexOf(b[i])>-1){
return true;
}
}
return false;
function largestOfFour(arr) {
// You can do this!
var max=0,i=0,j=0;
var newArray=[];
for (i=0;i<arr.length;i++){
for(j=0;j<=arr.length;j++)
if(arr[i][j]>max){
max=arr[i][j];
}