A Pen by Tari ogounga on CodePen.
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 | |
func packetDescrambler(seq []int, fragmentData []string, n int) string { | |
maxSeqIdx := func(numSlice []int) int { | |
max := numSlice[0] | |
for _, n := range numSlice[1:] { | |
if n > max { | |
max = n | |
} | |
} |
A Pen by Tari ogounga on CodePen.
A Pen by Tari ogounga on CodePen.
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
/** | |
* Calculates the price of the order. | |
* | |
* @param quantity is the number of cups of coffee ordered | |
*/ | |
private void calculatePrice(int quantity) { | |
int price = quantity * 5; | |
} |