![subject](/tpl/images/cats/informatica.png)
Computers and Technology, 16.04.2020 00:30 ilovemilk1981
Al and Bill are arguing about the performance of their sorting algorithms. Al claims that his O(N log N)-time algorithm is always faster than Bill's O(N2)-time algo- rithm. To settle the issue, they implement and run the two algorithms on many randomly generated data sets. To Al's dismay, they find that if N γ 1000 the O(N2)- time algorithm actually runs faster, and only when N γ 1000 the 0(N logN)-time (10 pts.) one is better. Explain why the above scenario is possible
![ansver](/tpl/images/cats/User.png)
Answers: 3
![](/tpl/images/ask_question.png)
![](/tpl/images/ask_question_mob.png)
Another question on Computers and Technology
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 07:50
Apython programming question: assume s is a string of lower case characters. write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print number of times bob occurs is: 2
Answers: 3
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 21:00
Which set of steps will organize the data to only show foods with more than 100 calories and rank their sugar content from greatest to least?
Answers: 1
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 23.06.2019 23:00
How do you know if the website is secure if you make a purchase
Answers: 2
![question](/tpl/images/cats/informatica.png)
Computers and Technology, 24.06.2019 21:30
Computer security/cybersecurity1) each of the following code fragments contains a number of security vulnerabilities. for each fragment, identify these security vulnerabilities and, for each vulnerability, discuss at least one way that it could be improved. note that in your discussion of how each vulnerability could be improved, you do not need to re-write a new version of the program in c; simply discuss your solution, either in pseudocode or in 1-2 sentences.a) /* file descriptor leak */#include #include int main(int argc, char *argv[]){ char *filepath = argv[0]; char *shellpath = argv[1]; file *passwords; passwords = fopen(filepath, "r"); /* read the password and do something with it */ /* . . */ /* fork and execute alternative shell */ execl(shellpath, "shell", null); }b)#include /* assume the following function is written for an electronic storefront. the user will enter the id of the item to be ordered, as well as the quantity of units that they would like to purchase. the program will then lookup the price for the price for the item using a predefined function, and return the total cost of the order.*/int gettotalcost(){ char itemid[9]; int price, unitsordered, cost; printf(" enter the 9-digit id of the item to be ordered: "); scanf("%s", & itemid); /* lookup the price according to the itemid */ price = getpricebyid(itemid); printf(" enter the quantity of units to be ordered: "); scanf("%d", & unitsordered); cost = price * unitsordered; return cost; }c)#include /* the following function is intended to return a user's full name by concatenating the user's first and last name into a single string and then returning that string. */char *getfullname(char *firstname, char *lastname, int max_len){ char fullname[max_len]; strcpy(fullname, firstname); strcat(fullname, " "); strcat(fullname, lastname); return fullname; }d)#include /* the following code snippet runs through the list of cli arguments entered and displays them to the console. */int main(int argc, char *argv[]){ int i; printf("you've entered the following arguments: "); for(i = 0; i < argc; i++){ print(argv[i]); printf("\n"); } /* */}
Answers: 2
You know the right answer?
Al and Bill are arguing about the performance of their sorting algorithms. Al claims that his O(N lo...
Questions
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 20.09.2019 18:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 20.09.2019 18:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/mat.png)
Mathematics, 20.09.2019 18:00
![question](/tpl/images/cats/obshestvoznanie.png)
Social Studies, 20.09.2019 18:00
![question](/tpl/images/cats/mat.png)
Mathematics, 20.09.2019 18:00
![question](/tpl/images/cats/biologiya.png)
Biology, 20.09.2019 18:00
![question](/tpl/images/cats/istoriya.png)
History, 20.09.2019 18:00
![question](/tpl/images/cats/ekonomika.png)
Business, 20.09.2019 18:00
![question](/tpl/images/cats/istoriya.png)
History, 20.09.2019 18:00
![question](/tpl/images/cats/mat.png)
Mathematics, 20.09.2019 18:00
![question](/tpl/images/cats/mat.png)
Mathematics, 20.09.2019 18:00
![question](/tpl/images/cats/en.png)
English, 20.09.2019 18:00
![question](/tpl/images/cats/biologiya.png)
Biology, 20.09.2019 18:00
![question](/tpl/images/cats/en.png)
English, 20.09.2019 18:00
![question](/tpl/images/cats/mat.png)
![question](/tpl/images/cats/istoriya.png)
History, 20.09.2019 18:00
![question](/tpl/images/cats/istoriya.png)
![question](/tpl/images/cats/biologiya.png)
Biology, 20.09.2019 18:00
![question](/tpl/images/cats/es.png)
Spanish, 20.09.2019 18:00