Java assignment

Proyek ini berhasil diselesaikan oleh Ferinota dengan harga $19 USD dalam sehari.

Dapatkan penawaran gratis untuk proyek seperti ini
Pemberi kerja bekerja
Anggaran Proyek
$10 - $30 USD
Diselesaikan Dalam
1 hari
Total Penawaran
Deskripsi Proyek


Question 1

Suppose you are given three strings of characters: X, Y and Z where jXj = n, jY j = m, and

jZj = n + m. Z is said to be a shue of X and Y i Z can be formed by interleaving the

characters from X and Y in a way that maintains the left-to-right ordering of the characters

from each string.

Give an ecient dynamic-programming algorithm that determines whether Z is a shue

of X and Y. Hint: The values of the dynamic programming matrix you construct should

be Boolean, not numeric.

Class name has to be Shuer and it has to have a method named as isShue which takes

three Strings as input; X, Y and Z respectively and returns Boolean value.

Question 2

Write a program that computes the percentage of red nodes in a given red-black BST. Test

your program by running at least 100 trials of the experiment of inserting N random keys

into an initially empty tree, for N = 104, 105, and 106, and plot the results. X-axis should

be N and Y-axis should be average percentage of red nodes after 100 trials for each N.

Class name should be PlotRBT.

Diselesaikan oleh:
Keahlian yang Diperlukan

Ingin menghasilkan uang?

  • Atur anggaran Anda dan jangka waktunya
  • Uraikan proposal Anda
  • Dapatkan bayaran atas pekerjaan Anda

Pekerjakan para freelancer yang juga menawar di proyek ini

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online