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
def maxShared(friendsNodes: Int, friendsFrom: Array[Int], friendsTo: Array[Int], friendsWeight: Array[Int]): Int = { | |
val allNodesFrom = friendsFrom ++ friendsTo | |
val allWeights = friendsWeight ++ friendsWeight | |
val allNodesTo = friendsTo ++ friendsFrom | |
val nodeToNodeOverInterest = allNodesFrom | |
.zipWithIndex | |
.foldLeft(Map[Int, Map[Int, Set[Int]]]())((acc, p) => { |
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
prompt:/# kvm -version | |
QEMU emulator version 2.9.0 (v2.9.0-dirty) | |
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers | |
prompt:/# uname -a | |
Linux ThinkPad-P50 4.13.8-041308-generic #201710180430 SMP Wed Oct 18 08:33:18 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux |