Computer Science

posted by .

Given three Strings, str1, str2 and str3, return the longest String. If all three Strings have the same length, return "same". There will not be a tie between two longest Strings.

longestString("apple", "banana", "pear") → "banana"
longestString("one", "two", "three") → "three"
longestString("bob", "jim", "joe") → "same"

Respond to this Question

First Name
School Subject
Your Answer

Similar Questions

  1. physics

    A doubly tethered model airplane of mass 1.0 kg is attached to a vertical rod by two very light strings that are 2.0 each in length. the airplane and the the strings rotate in a horizontal circleabout the rod with both the strings …
  2. Physics

    Two identical violin strings, when i tune and stretched with the same tension, have a fundamental frequency of 440Hz. One of the strings is retuned by adjusting the tension. When both strings are pluckes simultaneously, after one has …
  3. physics

    Two balls have the same mass of 3.085 kg and identical charges of 21.0 ìC. They hang from the ceiling on strings of identical length as shown in the figure. If the angle with respect to the vertical of the strings is 22.0°, what …
  4. physics

    Two balls have the same mass of 0.525 kg and identical charges of 13.0 μC. They hang from the ceiling on strings of identical length as shown in the figure. If the angle with respect to the vertical of the strings is 22.0°, what …
  5. physics

    a 1.29 kg ball is connected by means of two massless strings to a vertical, rotating rod. The strings are tied to the rod and are taut. The tension in the upper string is 38 N. The length of both strings is 1.70m and the distance between …
  6. physics

    Two strings are adjusted to vibrate at exactly 224 Hz. Then the tension in one string is increased slightly. Afterward, three beats per second are heard when the strings vibrate at the same time. What is the new frequency of the string …
  7. Physics

    You’ve purchased two identical violin strings. You install one of the strings in a conventional violin; the other string you stretch between two posts, each attached to rigid concrete pillar in the open air. Both strings are made …
  8. physics

    An object of weight 50 N is suspended vertically by two strings. The strings are of the same lenght and the angle between them is 60 degree. Draw a free body diagram of the forces acting on the object. Calculate the tension in the …
  9. physics

    Two strings are vibrating at the same frequency of 113 Hz. After the tension in one of the strings is decreased, an observer hears two beats each second when the strings vibrate together. Find the new frequency in the adjusted string.
  10. maths

    String p is 3 times as long as string q. string r is 3m longer than half the total length of strings p and q. If the total length of all three strings is 54oocm what is the length of string r.

More Similar Questions