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
class TapeEquilibrium { | |
public: | |
int tape_equilibrium( int A[] , int N ){ | |
int sum_1 = 0 , sum_2 = 0 , min_sum; | |
for ( int i=0 ; i<N ; i++ ) | |
sum_2 += A[i]; | |
//set minimum sum equal first cell for compair with others | |
min_sum = abs(sum_2 - (2*A[0])); |
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
#!/bin/sh | |
# Install Python prerequisites on NVIDIA Jetson TK1 for iTorch | |
# This is for https://github.com/facebook/iTorch | |
# L4T 21.3, Torch 7 (http://torch.ch) | |
# Python 2.7 or greater must be installed before running this script | |
# Torch 7 should already be installed before running this script | |
# iPython is loaded using pip, as repository version is 1.x version, > 2.0 is needed | |
# Need to compile from source as repository version libzmq3-dev is not the correct revision | |
wget http://download.zeromq.org/zeromq-4.0.5.tar.gz | |
tar xzvf zeromq-4.0.5.tar.gz |