Browse S
Alphabetical listing with fast deep pagination.
53166 items • Page 903 / 1064
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an). We are interested in sorting this list, and ideally sorting it as efficiently as possible / with…
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an). We are interested in sorting this list, and ideally sorting it as efficiently as possible / with…
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an). We are interested in sorting this list, and ideally sorting it as efficiently as possible / with…
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an
Suppose you are given a sequence or array of n real numbers: (a1, a2, . . . , an). We are interested in sorting this list, and ideally sorting it as efficiently as possible / with…
Suppose you are given a set S of n points (x 1 ,y 1 ), . . . , (x n , y n ) wher
Suppose you are given a set S of n points (x1,y1), . . . , (xn, yn) where thexis and yis are distinct (i.e., no two are equal). We use pi as a shorthand for thepoint (xi, yi). A p…
Suppose you are given a set S of tuples = {(v_1, p_1), (v_2, p_2), ..., (v_n, p_
Suppose you are given a set S of tuples = {(v_1, p_1), (v_2, p_2), ..., (v_n, p_n)} and an integer X. Your goal is to a find a set T subsetorequalto {1, 2, ..., n} such that sigma…
Suppose you are given a set S of tuples = {(v_1, p_1), (v_2, p_2), ..., (v_n, p_
Suppose you are given a set S of tuples = {(v_1, p_1), (v_2, p_2), ..., (v_n, p_n)} and an integer X. Your goal is to a find a set T {1, 2, ..., n} such that sigma_i elementof T p…
Suppose you are given a set S of tuples = {langle upsilon_1, p_1 rangle, langle
Suppose you are given a set S of tuples = {langle upsilon_1, p_1 rangle, langle upsilon_2, p_2 rangle, ..., langle upsilon_n, p_n rangle} and an integer X. Your goal is to a find …
Suppose you are given a set of n documents numbered 1 through n. Suppose there i
Suppose you are given a set of n documents numbered 1 through n. Suppose there is a list of m words numbered 1 through m that are of interest to you. Define vectors x1through xnas…
Suppose you are given a set of small boxes, numbered 1 to n, identical in every
Suppose you are given a set of small boxes, numbered 1 to n, identical in every respect except that each of the first i contain a pearl whereas the remaining n ? i are empty. You …
Suppose you are given a set of small boxes, numbered 1 to n, identical in every
Suppose you are given a set of small boxes, numbered 1 to n, identical in every respect except that each of the first i contain a pearl whereas the remaining n - i are empty. You …
Suppose you are given a six-sided die, that might be biased in an unknown way. E
Suppose you are given a six-sided die, that might be biased in an unknown way. Explain how to use die rolls to generate unbiased coin flips, and determine the expected number of d…
Suppose you are given a table c that was used to compute an LCS, but not the ori
Suppose you are given a table c that was used to compute an LCS, but not the original strings. Assume that the input string X is represented down the rows and Y across the columns…
Suppose you are given a text file that contains the names of people. Every name
Suppose you are given a text file that contains the names of people. Every name in the file consists of a first name and last name. Unfortunately, the programmer who created that …
Suppose you are given a text file that contains the names of people. Every name
Suppose you are given a text file that contains the names of people. Every name in the file consists of a first name and last name. Unfortunately, the programmer that created the …
Suppose you are given a text file that contains the names of people. Every name
Suppose you are given a text file that contains the names of people. Every name in the file consists of a first name and last name. Unfortunately, the programmer that created the …
Suppose you are given a text file words2.txt. It contains a set of words. Your t
Suppose you are given a text file words2.txt. It contains a set of words. Your task is to read the words from the file, sort them alphabetically using algorithm, and create a file…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items –
Suppose you are given an already sorted array that may contain duplicate items – i.e., items that appear more than once. Add a method to the Sort class called removeDups() that ta…
Suppose you are given an already sorted array that may contain duplicate items—i
Suppose you are given an already sorted array that may contain duplicate items—i.e., items that appear more than once. Add a method to the Sort class called removeDups() that take…
Suppose you are given an already sorted list that may contain duplicate items –
Suppose you are given an already sorted list that may contain duplicate items – i.e., items that appear more than once. Add a method to the SortCount class (in SortCount.py) calle…
Suppose you are given an array A with n entries, with each entry holding a disti
Suppose you are given an array A with n entries, with each entry holding a distinct number. You are told that the sequence of values A[1], A[2], …, A[n] is unimodal: for some inde…
Suppose you are given an array A with n entries, with each entry holding a disti
Suppose you are given an array A with n entries, with each entry holding a distinct number. You are told that the sequence of values A[1], A[2], …, A[n] is unimodal: for some inde…
Suppose you are given an array A with n entries, with each entry holding a disti
Suppose you are given an array A with n entries, with each entry holding a distinct number. You are told that the sequence of values A[1], A[2], …, A[n] is unimodal: for some inde…
Suppose you are given an array A[1 .. n] of n distinct integers, sorted in incre
Suppose you are given an array A[1 .. n] of n distinct integers, sorted in increasing order. Describe and analyze an algorithm to determine whether there is an index i such that A…
Suppose you are given an array of n integers a 1 , a 2 , …. a n. You need to fin
Suppose you are given an array of n integers a1, a2, …. an. You need to find out the length of its longest sub-array (not necessarily contiguous) such that all elements in the sub…
Suppose you are given an array of n integers a1, a2, .., an. You need to find ou
Suppose you are given an array of n integers a1, a2, .., an. You need to find out the length of its longest sub-array (not necessarily contiguous) such that all elements in the su…
Suppose you are given an array of n integers a1, a2, …, an. You need to find out
Suppose you are given an array of n integers a1, a2, …, an. You need to find out the length of its longest sub-array (not necessarily contiguous) such that all elements in the sub…
Suppose you are given an array of n integers ai, az, ..., an. You need to find o
Suppose you are given an array of n integers ai, az, ..., an. You need to find out the length of its longest sub-array (not necessarily contiguous) such that all elements in the s…
Suppose you are given an n × n checkerboard with some of the squares deleted. Yo
Suppose you are given an n × n checkerboard with some of the squares deleted. You have a collection of 2 × 1 dominoes, which can be used to cover any two adjacent squares. Describ…
Suppose you are given an undirected graph G with weighted edges and a minimum sp
Suppose you are given an undirected graph G with weighted edges and a minimum spanning tree T of G. • Design an algorithm to update the minimum spanning tree when the weight of a …
Suppose you are given an undirected graph G with weighted edges and a minimum sp
Suppose you are given an undirected graph G with weighted edges and a minimum spanning tree T of G. • Design an algorithm to update the minimum spanning tree when the weight of a …
Suppose you are given an undirected graph G, and two vertices s and t. We know t
Suppose you are given an undirected graph G, and two vertices s and t. We know that we can check to see if there is a path from s to t by simply doing a breadth first search or a …
Suppose you are given an unsorted array A[1..n], which contains all but one of t
Suppose you are given an unsorted array A[1..n], which contains all but one of the n + 1 integers in the range 0, . . . , n (so exactly one of these elements is missing from A). T…
Suppose you are given an unsorted list of n distinct numbers. However, the list
Suppose you are given an unsorted list of n distinct numbers. However, the list is close to being sorted in the sense that each number is at most k positions away from its origina…
Suppose you are given integers a, b, c, and d, and you must computethe two quant
Suppose you are given integers a, b, c, and d, and you must computethe two quantities: x = ab+bc+ad-cc and y = ab+cc+cd As written, the equations suggest doing seven multiplicatio…
Suppose you are given n ropes of different lengths, you need to connect these ro
Suppose you are given n ropes of different lengths, you need to connect these ropes into one rope. The cost to connect two ropes is equal to sum of their lengths. You want to find…
Suppose you are given recurrences of the form T(n) = aT(n/b) + g(n), with T(1) =
Suppose you are given recurrences of the form T(n) = aT(n/b) + g(n), with T(1) = d > 0 and g(n) > 0 for all n, and S(n) = aS(n/b) + g(n), with S(1) = 0 (and the same a, b, a…
Suppose you are given recurrences of the form T(n) = aT(n/b) + g(n), with T(1) =
Suppose you are given recurrences of the form T(n) = aT(n/b) + g(n), with T(1) = d > 0 and g(n) > 0 for all n, and S(n) = aS(n/b) + g(n), with S(1) = 0 (and the same a, b, a…
Suppose you are given the James River Jewelry database design as follows: CUSTOM
Suppose you are given the James River Jewelry database design as follows: CUSTOMER ( CustomerID, LastName, FirstName, Phone, Email) PURCHASE ( InvoiceNumber, Date, PreTaxAmount, C…
Suppose you are given the James River Jewelry database design as follows: CUSTOM
Suppose you are given the James River Jewelry database design as follows: CUSTOMER ( CustomerID, LastName, FirstName, Phone, Email) PURCHASE ( InvoiceNumber, Date, PreTaxAmount, C…
Suppose you are given the James River Jewelry database design as follows: CUSTOM
Suppose you are given the James River Jewelry database design as follows: CUSTOMER ( CustomerID, LastName, FirstName, Phone, Email) PURCHASE ( InvoiceNumber, Date, PreTaxAmount, C…
Suppose you are given the James River Jewelry database design as follows: CUSTOM
Suppose you are given the James River Jewelry database design as follows: CUSTOMER ( CustomerID, LastName, FirstName, Phone, Email) PURCHASE ( InvoiceNumber, Date, PreTaxAmount, C…
Suppose you are given the James River Jewelry database design as follows: CUSTOM
Suppose you are given the James River Jewelry database design as follows: CUSTOMER ( CustomerID, LastName, FirstName, Phone, Email) PURCHASE ( InvoiceNumber, Date, PreTaxAmount, C…