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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T02:10:22+00:00 2026-06-04T02:10:22+00:00

I am developing a pathfinding algorithm for an Android game, and I can write

  • 0

I am developing a pathfinding algorithm for an Android game, and I can write a recursive version (which is nice, but needs a big stack, so I might need to create a dedicated Thread for this with bigger stacksize), and a “loop” version which uses a buffer (instead of recursion). It is also a big problem that I don’t know the size of the buffer in advance, so currently only the stack-based solution looks feasible.

I know this may be an algorithm theory or general computer science question, but perhaps it’s Android specific because the stack size is a system-specific feature after all.

Generally, which should be more efficient (speed) on Android? The stack one, or the one which relies on buffer (heap)? Note that the question approaches the problem architecture-wise (assuming that the algorithmic complexity doesn’t depend whether the algorithm is recursive or loop-based).

  • 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-04T02:10:24+00:00Added an answer on June 4, 2026 at 2:10 am

    I know you asked for a Android specific answer, but I don’t think it’s really relevant to your problem. Two remarks

    1. You don’t necessarily need a stack based solution to implement a
      recursive algorithm, you can emulate the stack on the heap with a
      stack based data structure. Some times you don’t even need this, though. This takes a bit more work, but don’t base your algorithm on artifical architectural constraints.
    2. There are plenty of non-recursive pathfinding, shortest path algorithms, ie Bellman-Ford

    I can’t comment on whether the most optimal recursive solution to a problem is going to be better than the most optimal iterative solution on Android. Usually, all other things being equal, the iterative solution is going to be faster, but when you get to more complex algorithms than say, Fibonacci numbers, implementing an iterative algorithm recursively or vice-versa might make a difference.

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

Sidebar

Related Questions

I am developing a game and implemented pathfinding algorithm. My pathfinding returns me a
Currently developing an application using the newest version of symfony, obtained through PEAR. This
When developing an application which mostly interacts with a database, what is a good
I'm developing a small game in python. I am using a 2D rectangular grid.
I'm working on developing a fairly robust 2D game engine as a base that
Developing applications for Android in Eclipse, press F11 to run the program in the
Developing an application for Android, i want to record data that will be usefull
Developing a .NET WinForms application: how can I check if the window is in
Developing server side code i finally got my eyes X-crossed trying to write -
Developing a simple game for the iPhone, what gives a better performance? Using a

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.