Questions tagged [algorithm]

The tag has no usage guidance.

3 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

PSET 3 Plurality Print_winner function prints smallest number of votes too many times (sorting algorithm?)

I am doing Problem Set 3 Plurality. I am currently on the print_winner function. My program compiles but I'm having issues because it does not print the winner and any ties it prints whoever got the ...
0
votes
1answer
51 views

Can you help me to understand why does the output of time function vary every time while applying it on same file with same sort type?

When I run for example (time ./sort1 random5000.txt) it gives me real, syst, and user time. But if I run the same command again it will gives me different time results! I can't understand why this ...
0
votes
0answers
141 views

FATAL: varcache miss for varobj var50.0 while using debug50

I am trying to debug a code but whenever I try to run gdb I'm getting FATAL: varcache miss for varobj var50.0 #import <stdio.h> int main(){ int n; scanf("%d",&n); int arr[1000]...