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

  • Home
  • SEARCH
  • 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 8769157
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T17:15:42+00:00 2026-06-13T17:15:42+00:00

I am stuck at a problem with strings. I have many (lets say more

  • 0

I am stuck at a problem with strings. I have many (lets say more 100) two dimensional arrays with strings. I will need to search through them for occurrence of a match string (entered through a search bar). If any occurrence, the row containing the matched string have to be displayed in a table view. With each entered character in the search bar, the results must be refined and displayed in a table view.

All the strings data must be saved and must be opened for later use. Could any one please suggest on the following things?

  1. Is it fine saving all the two dimensional arrays of strings in a database.(SQLite)? or each array in an xml file? or any other better idea?

  2. How to search efficiently through the all the strings? I am thinking to create a trie data structure for better searching.

Thanks!

  • 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-13T17:15:45+00:00Added an answer on June 13, 2026 at 5:15 pm

    Given that you have up to 20,000,000 strings, I wouldn’t advise using XML for your file format. It will add a lot of overhead both in disk space and parsing time. A database definitely sounds like a better way to go to me. If the strings were all the max length, that would be 5GB of data just for the strings, so you might even want to compress them in some way, depending on the end user’s machine.

    A trie also sounds like a good choice of data structure for searching through them. Though, it will be pretty big. It might not need to be the whole 5GB in memory, but with the various pointers and stuff needed to implement it, it will likely still be quite large. How large probably depends on the amount of overlap between the strings’ prefixes. You could use a compact prefix tree if the data proves too large.

    Another option would be to sort them all and do a binary search as the user types. It would probably not be efficient to sort them on the fly, though, so you’d probably want to save a pre-sorted index of the strings. (Not sure if you can do that, or if the data changes while running the app.)

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

Sidebar

Related Questions

I have a problem which has been torturing for many hours. I need to
I got stuck with this problem. I wrap two tables inside of a h:form.
I'm stuck on a problem I really don't know how to solve: I have
I am stuck on a problem: in my software I have to code for
i've stuck with problem. I have an ASP.NET project with dynamically creating controls. Even
I stuck at this issue many times and I passed the problem in different
I am stuck in a scenario where I can have many game screens, and
I know many people have had this problem and I have searched Google/Stack Overflow,
I am stuck with my solution to problem 4 of Project Euler, I have
I stuck with problem of mail application , i am developing a website for

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.