Posted at 02:36h
in
Uncategorized
by admin
Question:
You are given a string ‘s’ consisting of lowercase English letters. A duplicate removal consists of choosing two adjacent and equal letters and removing them.
We repeatedly make duplicate removals on s until we no longer can.
Return the final string after all such duplicate removals have...
Question:
Alice and Bob have a different total number of candies. You are given two integer arrays aliceSizes and bobSizes where aliceSizes[i] is the number of candies of the ith box of candy that Alice has and bobSizes[j] is the number of candies of the jth...
Question 1.
You probably used a for loop in your program in last homework. That’s how most people would do it. But just for practice, try doing the same thing with a while loop.
You have to use while loop!!!!
Sample Input:
Which multiplication table would you like? 5
Sample Output:
Here’s your table:
5...
Question:
please add two methods in the class HeroApp, check_int() and check_real().
The check_int() method will take 2 arguments str_num and attr and complete the following data validation:
should not be empty.
should be integer number
should in between 1- 100000
The check_real() method will take 2 arguments...
Question 1.
Write a program that asks for your first name, then asks for your last name, and then prints a message with your first and last names in it.
Sample Input:
What is your first name? Kevin
What is your Last name? Zhu
Sample Output:
(it means if user enters the above answer...
Question 1.
You probably used a for loop in your program in last homework. That’s how most people would do it. But just for practice, try doing the same thing with a while loop.
Sample Input:
Which multiplication table would you like? 5
Sample Output:
Here’s your table:
5 x 1 = 5
5 x...