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
    
  
  
    
  | history | awk '{CMD[$2]++;count++;}END { for (a in CMD) print CMD[a] " " CMD[a]/count*100 "% " a;}' | |
| #or fully | |
| history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10 | 
  
    
      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
    
  
  
    
  | /*Problem Definition | |
| Imagine that you are a developer with the Lowe's iOS team. | |
| The team has been tasked with launching a new product suggestion service. | |
| The suggestion logic is based on the following rules: | |
| • A customer should only be suggested to purchase a product that they have not bought themselves. | |
| • A customer should only be suggested to purchase a product that their friends have purchased | |
| • The suggestion order should be driven by how many friends have purchased the same item | |
| •If multiple friends purchased the same item, it should be higher in the suggestions than a product that only one friend owns. |