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
#!/bin/bash | |
#Jerry pushes dave in the elevator | |
for i in `seq 1 10` | |
do | |
clear | |
printf "\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | |
awk "BEGIN {while (c++<$i) printf \"-\"}" | |
printf "|" |
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
struct Results solution(int N, int A[], int M) { | |
struct Results result; | |
// write your code in C99 | |
int * c = calloc(N, sizeof(int)); | |
int max = 0; | |
int latestMax = 0; | |
int i = 0; | |
int idx = 0; | |
for (; i < M; i++) { |
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
int solution(int A[], int N) { | |
// write your code in C99 | |
int minimal = 1; | |
int i = 0; | |
int * array = calloc(N + 1, sizeof(int)); | |
for (; i < N; i++) { | |
if (A[i] > 0 && A[i] <= N && array[A[i]] == 0) { | |
array[A[i]] = 1; |
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
int solution(int A[], int N) { | |
int i = 0; | |
int * array = calloc(N + 1, sizeof(int)); | |
int sum = N * (N + 1) / 2; | |
int sum2 = 0; | |
for (; i < N; i++) { | |
NewerOlder