8
Given an array of ints length 3, return a new array with the elements in reverse order, so {1, 2, 3} becomes {3, 2, 1}. 
reverse3({1, 2, 3}) → {3, 2, 1}
reverse3({5, 11, 9}) → {9, 11, 5}
reverse3({7, 0, 0}) → {0, 0, 7}

Solution:


public int[] reverse3(int[] nums) {
  int[] rev={nums[2],nums[1],nums[0]};
  return rev;
}

Post a Comment

  1. website design agencies
    Wonderful, just what a blog it is! This blog has provided the helpful data to us continue the good work.

    ReplyDelete
  2. Best graphic design firms, demonstrated a high-level understanding of the interactive design firms requirements website design agencies , and executed the project well.

    ReplyDelete
  3. The team impressed with their candid and transparent approach
    branding companies in San Francisco

    ReplyDelete
  4. Outstanding blog, in my opinion site owners should acquire a great deal out of this blog its very user welcoming.
    interactive design agencies

    ReplyDelete
  5. Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
    Write fo Us Betting Guest Posts providing an opportunity to submit a guest post on our General Blog. Gambling Online Betting compelling guest posts on Gambling, Casino, Betting, Sports Betting, Guest Blogging, and various categories topics to write for us. Do you have expertise on a topic that you’d love to share with our audience? These are a great way to share your experience and advice with others so that they can start, grow business and their financial situations. Write for us to get Expand your outreach, Promote your Business and Products at a high authority website.

    ReplyDelete
  6. Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
    Types of Flooring The type of flooring you choose can make a significant difference to the décor and function of your home.

    ReplyDelete
  7. Vmovee is not that old site for streaming movies online but when it comes to watch movies online, it has such a large database of movies from various genre that you can wish to watch. Not only movies, but you can also watch TV shows online as well. Also with movies, you can go over to its Popular movies, Recent movies or featured movies section. With each movie page on Vmovee, you can see the perfect short description about the movie, as well as the release year, categories under which that particular movie falls into, name of actors, working on that movie, etc.
    vmovee

    ReplyDelete
  8. thanks for sharing! very informative Any web browser can be used to access the stories and posts that have been submitted to public Instagram accounts with the help of the web tool Dumpor.

    ReplyDelete

 
Top