Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
<html> | |
<body> | |
<h1> Hello </h1> | |
</body> | |
</html> |
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
void printArr(int arr[], int len){ | |
if(len == 0){ | |
printf("\n"); | |
return; | |
} | |
printf("%d,",arr[0]); | |
printArr(arr + 1, len - 1); | |
} |
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
//insert integer x into index ind | |
void insert_to_arr(int* arr, int arr_size, int x, int ind){ | |
arr = (int*)realloc(arr, sizeof(int) * (arr_size + 1) ); | |
print_array(arr, arr_size + 1); | |
for(int i = arr_size; i > ind; i--){ | |
arr[i] = arr[i - 1]; | |
} | |
arr[ind] = x; | |
} |
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
// your_objects is vector of pair<string, vector<int> > | |
// PQ is your priority_queue | |
int vector_counter = 0; | |
for(int i = 0; i < 10; i++){ | |
PQ.push(your_pairs[vector_counter]); | |
vector_counter++; | |
} | |
while(vector_counter < your_objects.size()){ | |
PQ.push(your_pairs[vector_counter]); | |
PQ.pop(); |