Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6600585
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:38:34+00:00 2026-05-25T18:38:34+00:00

In a facebook group, I saw a question like : If a row dominated

  • 0

In a facebook group, I saw a question like :

If a row dominated two dimensional array in the following which one is advantage and why?

a) for(i=0;i<1000;i++)
      for(j=0;j<1000;j++)
           temp=temp+a[i][j];

b) for(j=0;j<1000;j++)
      for(i=0;i<1000;i++)
         temp=temp+a[i][j]

From my point I can see there is no difference in the above two statements. And I guess these both are same.

Correct me if am wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T18:38:34+00:00Added an answer on May 25, 2026 at 6:38 pm

    There is no difference in theory.

    The practical advantage is in cache locality. If you access locations which are far apart, you increase the number of cache misses, which in turn makes the code run slower.

    Depending on your processor cache size, you would perhaps need to replace 1000 with some reasonably bigger number in order to perceive the effect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a website for a comedy group which uses Facebook as one
I'd like to integrate user comments for a Facebook or Group on my website.
Let's say you have a page like facebook. You have a certain group page
My Facebook group is about my iPhone software. Is there a way to have
My old non-smart phone doesn't support GROUP facebook chat, so I was trying to
How do I check if a facebook page, group, or person exists using php?
Facebook allows a distance parameter for their search like https://graph.facebook.com/search?q=coffee&type=place&center=37.76,-122.427&distance=1000 They don't say what
Facebook's See Friendship option diplays a complete history of two users' posts on each
Facebook recently introduced the Built-in Like as a built-in Open Graph action (see blogpost
I want to post an event to a facebook group using the graph API

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.