Answer:
public void removePrefixStrings(List<String> list , String prefix) {
if(list==null || list.size()==0)
return;
for(int i=0; i<list.size();) {
if(list.get(i).startsWith(prefix))
list.remove(i);
else
++i;
}
}
Time Complexity: If the prefix is the same as String length, Then finding all prefix match will take n *n = n2
Then removal is also n
So the total time complexity is O(n3)
Write a program that asks the user to enter in a username and then examines that username to make sure it complies with the rules above. Here's a sample running of the program - note that you want to keep prompting the user until they supply you with a valid username:
user_in = input ("Please enter your username: " )
if user_in in "0123456789":
print ("Username cannot contain numbers")
elif user_in in "?":
print ("Username cannot continue special character")
else:
print (" Welcome to your ghetto, {0}! ".format(user_in))
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah….
a. Margin
b. View
c. LayOut
d. Paragraph
Office 92 sering disebut juga dengan….
a. Office 3.0
b. Office 7.0
c. Office Xp
d. Office 2.0
Fasilitas untuk pengaturan batas kertas pada Microsoft Word adalah
B.View
Office 92 sering disebut juga dengan
A.Office 3.0