Enable contrast version

Tutor profile: Thi N.

Inactive
Thi N.
High School Valedictorian, 3rd Year CS Student, 4.0 GPA
Tutor Satisfaction Guarantee

Questions

Subject: Java Programming

TutorMe
Question:

Write a recursive method to reverse a string. Implement this method by taking the first letter of the string, reversing the remaining text, and combining the two.

Inactive
Thi N.
Answer:

Remember that a recursive method is a method that calls itself. Let's say the method name is reverseRecurse. The recursive method will be in this form: public String reverseRecurse (String s ) { if ( ) { //base case } else { //recursive case } } First, we must decide the base case (a case where the method returns the String and stop calling itself) of the recursive method. The method should not call itself if the length of the string is 1 or 0 characters because the reversed version will look the same so the base case is s.legnth()<=1. The method now looks like this with the base case: public String reverseRecurse (String s ) { if (s.length()<=1) { return s; } else { } } Second, we must determine the recursive case. If the string is longer than 1 character, we will move the first letter of the string to the end of it and pass it into the method. The final method looks like this: public String reverseRecurse (String s ) { if (s.length()<=1) { return s; } else { //s.substring(1) is the string without the first character //s.substring(0,1) is the first letter of the string return reverseRecurse (s.substring(1)) + s.substring (0,1); //moves the first character to the end and passes it into the method } }

Subject: Basic Math

TutorMe
Question:

Solve $$\dfrac{2}{13} + \dfrac{5}{26}$$.

Inactive
Thi N.
Answer:

Note: -Denominator is the bottom number of a fraction -Numerator is the top number of a fraction. - Least common denominator is the lowest common multiple of the fractions. Remember that fractions can only be added if they have the same denominator. Since 13 an 16 are not the same, we must change the denominators. To do this: First, we must find the least common denominator between the two fractions. In this problem, the Least common denominator is 26. Second, make the denominators equal to each other. Since $$13\times 2=26$$, multiply top and bottom of the first fraction by 2. $$\dfrac{2}{2} \times\dfrac{2}{13} = \dfrac{4}{26}$$. Third, add the fractions by adding the numerators. Remember that the denominator does not change. $$\dfrac{4}{26} + \dfrac{5}{26} = \dfrac{9}{26} $$.

Subject: Algebra

TutorMe
Question:

Solve the following quadratic equation by factoring: $$x^2+11x+10=0$$

Inactive
Thi N.
Answer:

Remember that quadratic equations are in the form $$ax^2+bx+c$$. So for this equation, a = 1, b = 11, c = 10. I will be showing you how to factor this using the "X-box method", also known as the "diamond method." First, draw an X. $$\times$$ Second, write b in the top portion of the X and write the product of a and c in the bottom portion of the X. So the X now looks like this 11 $$\times$$ 10 Third, find two numbers whose sum is 11 and the product is 10. For this problem, the two numbers are 10 and 1. $$10 + 1 = 11$$ $$10 \times 1 = 10$$ We put 10 and 1 on the left and right side of the x. 11 10 $$\times$$ 1 10 Fourth, write the factored equation in this form: $$ (x + 10)(x+1) = 0$$ Fifth, solve for x. $$x+10=0$$ $$x=0-10$$ $$x=-10$$ $$x+1=0$$ $$x=0-1$$ $$x=-1$$ So the answer is: x = -10 x = -1

Contact tutor

Send a message explaining your
needs and Thi will reply soon.
Contact Thi

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.