This file contains hidden or 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
    
  
  
    
  | /* | |
| // Able to form the sentence -> true | |
| // Not able to form the sentence -> false | |
| Big O notation | |
| O (n^2) | |
| */ | |
| const newspaper = `Hello Readers, | |
  
    
      This file contains hidden or 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
    
  
  
    
  | /* | |
| str = "Hello There, | |
| this is a new world." | |
| sentence = "Hello World world"; // false | |
| can create -> return true; | |
| cannot create -> return false; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | let latencyTotal=0; | |
| let latencyAvg=0; | |
| let minusPos=0; | |
| let lattencyArr=[] | |
| let cb = latency => { | |
| lattencyArr.push(latency); | |
| if(lattencyArr.length>100){ | |
| latencyTotal-=lattencyAr[minusPos++]; | |
| } | |
| latencyTotal+=latency; | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /** | |
| * pushLatency(cb); | |
| * cb = latency => { | |
| * }; | |
| * | |
| * getAverageLatency => returns average of latest 100 latencies | |
| */ | |
| // 5,6,3,4 => 18 | |
| // 5,6,3,4,7 => (18 - 5) + 7 => 20 | |
| // 6,3,4,7,9 => (20 - 6) + 9 => 23 | 
  
    
      This file contains hidden or 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
    
  
  
    
  | /** | |
| pushLatency(callback(latency)) | |
| find an average of last 100 latencies | |
| you have to build an api which let's you query the average latency | |
| getAverageLantency() -> returns average of last 100 latencies | |
| */ | 
  
    
      This file contains hidden or 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
    
  
  
    
  | require 'formula' | |
| class Vim < Formula | |
| homepage 'http://www.vim.org/' | |
| url 'https://vim.googlecode.com/hg/', :revision => '6c318419e331' | |
| version '8.0' | |
| def features; %w(tiny small normal big huge) end | |
| def interp; %w(lua mzscheme perl python python3 tcl ruby) end |