9
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.
    Moviesda HD features a comprehensive Group of Bollywood, Hollywood Dual Audio Together with South Indian movies. You will discover biggest collection of Tamil, Telugu, and Malayalam movies on Films da. Each of the pictures on Movies da are free to download for everyone. You can utilize the search bar to look for the pirated pictures on Moviesda.

    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.
    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
  7. Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff. Are you a passionate and knowledgeable sports fan who is also a winning sports bettor. If this sounds like you and you have the ability to get your points across in a clear and easy to understand way then you may be just what we are looking for in a sportscasinobetting. Write for us Gambling

    ReplyDelete
  8. Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
    write for us on Businesses the need for articles and blogs about technology comes because such blogs and articles help even the common people know about the latest technological innovations.

    ReplyDelete
  9. Thanks for sharing this with so much of detailed information, its much more to learn from your article. Keep sharing such good stuff.
    Write for Us SEO is important for reaching these potential clients online. By optimizing your website and content for search engines, you can make sure that your firm appears as one of the top results when people are searching for legal information.

    ReplyDelete

 
Top