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 8226473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T15:47:01+00:00 2026-06-07T15:47:01+00:00

These terms were used in my data structures textbook, but the explanation was very

  • 0

These terms were used in my data structures textbook, but the explanation was very terse and unclear. I think it has something to do with how much knowledge the algorithm has at each stage of computation.

(Please, don’t link to the Wikipedia page: I’ve already read it and I am still looking for a clarification. An explanation as if I’m twelve years old and/or an example would be much more helpful.)

  • 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-06-07T15:47:03+00:00Added an answer on June 7, 2026 at 3:47 pm

    Wikipedia

    The Wikipedia page is quite clear:

    In computer science, an online algorithm is one that can process its
    input piece-by-piece in a serial fashion, i.e., in the order that the
    input is fed to the algorithm, without having the entire input
    available from the start. In contrast, an offline algorithm is given
    the whole problem data from the beginning and is required to output an
    answer which solves the problem at hand. (For example, selection sort
    requires that the entire list be given before it can sort it, while
    insertion sort doesn’t.)

    Let me expand on the above:

    An offline algorithm requires all information BEFORE the algorithm starts. In the Wikipedia example, selection sort is offline because step 1 is Find the minimum value in the list. To do this, you need to have the entire list available – otherwise, how could you possibly know what the minimum value is? You cannot.

    Insertion sort, by contrast, is online because it does not need to know anything about what values it will sort and the information is requested WHILE the algorithm is running. Simply put, it can grab new values at every iteration.

    Still not clear?

    Think of the following examples (for four year olds!). David is asking you to solve two problems.

    In the first problem, he says:

    “I’m, going to give you two balls of different masses and you need to
    drop them at the same time from a tower.. just to make sure Galileo
    was right. You can’t use a watch, we’ll just eyeball it.”

    enter image description here

    If I gave you only one ball, you’d probably look at me and wonder what you’re supposed to be doing. After all, the instructions were pretty clear. You need both balls at the beginning of the problem. This is an offline algorithm.

    For the second problem, David says

    “Okay, that went pretty well, but now I need you to go ahead and kick
    a couple of balls across a field.”

    enter image description here

    I go ahead and give you the first ball. You kick it. Then I give you the second ball and you kick that. I could also give you a third and fourth ball (without you even knowing that I was going to give them to you). This is an example of an online algorithm. As a matter of fact, you could be kicking balls all day.

    I hope this was clear 😀

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

Sidebar

Related Questions

I see these terms used interchangeably as the global environment for the DOM. What
I have heard both of these terms used, are they the same thing or
I am trying to understand static analysis of Java bytecode/source-code. These terms frequently come
When I study about cloud-computing, I usually see these terms: on-premise, off-premise applications. I
What is the difference between these 2 terms in Operating System: swap and page?
I am reading the Asp.net security documentation on msdn.I come across these tow terms
In MySQL database context, what is the difference among these 3 terms: stored procedure
My real Question is which of these is more efficient in terms of loading
In the context of data-structures synchronization, can someone clarify the difference between lockless and
I know that Apple's terms for apps disallows downloading and executing code, but there

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.