This file contains 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
// d = Number of prior transaction days | |
// transactions | |
function calculateNumberOfNotification(d, transactions) { | |
const n = transactions.length; | |
let numberOfNotifications = 0; | |
if (!n) { | |
return numberOfNotifications | |
} | |
if (n <= d) { | |
return numberOfNotifications |
This file contains 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
package main | |
import ( | |
"encoding/csv" | |
"log" | |
"os" | |
) | |
func main() { | |
// CSV Reader | |
file, err := os.Open("games.csv") |