Created
February 12, 2014 02:05
-
-
Save igul222/8948654 to your computer and use it in GitHub Desktop.
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
| arr2_pos = 0 | |
| product = 0 | |
| for each thing1 in arr1: | |
| while arr2[arr2_pos][0] <= thing1[0]: | |
| arr2_pos++ | |
| if arr2[arr2_pos][0] == thing1[0]: | |
| product += arr2[arr2_pos][1] * thing1[1] | |
| return product |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment