Questions tagged [search]

This tag is for questions about search algorithms, tools, and technologies.

20 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5 votes
0 answers
319 views

Rabin-Karp algorithm implementation

This code uses the Rabin-Karp algorithm to compare two text files. It takes a few minutes when both files contain around 1000 words. How can it be improved? ...
Chua's user avatar
  • 51
4 votes
0 answers
70 views

Array Search Algorithm

Recently, I've been experimenting with an array searching algorithm that I'm not sure I've seen anywhere (minor references here). I'm still not fully-learned on how to state the efficiency of what I'...
Lapys's user avatar
  • 141
4 votes
0 answers
147 views

Improved Knuth-Morris-Pratt over a source of indeterminate length

Following the successful review of my previous implementation. Please review my new, generic implementation of the Knuth-Morris-Pratt algorithm. Its modified to search a source of indeterminate ...
Jodrell's user avatar
  • 539
4 votes
0 answers
294 views

Solving Sudokus in Scheme Using Simulated Annealing

This program's purpose is to solve sudokus using simulated annealing. It first fills all the 3x3 blocks in the sudoku such that every block is filled with 1-9. It also builds a list of pairs of ...
Lara's user avatar
  • 175
3 votes
0 answers
293 views

reverse recursive search on an object with javascript - like tree search

I implemented a tree search with JavaScript. It has below basic rules. It will search over an array of objects which has recursive(like fractal) If it found a according data in a leaf(the final ...
Juneyoung Oh's user avatar
3 votes
0 answers
244 views

Fastest way to build string feature vectors Python

I have a list of strings to search along with a list of words and want to produce boolean feature vectors indicating presence of each word within the strings. What is the fastest way to build these ...
Danny Friar's user avatar
3 votes
0 answers
131 views

Filtering search results for apartment and car rentals

I am developing an app which is somewhat similar to airbnb. There are two search function, one for searching apartment and other for searching car rental. When searching apartment, the result page ...
Serenity's user avatar
  • 211
3 votes
0 answers
1k views

Moving from Solr (Sunspot) to ElasticSearch (Tire), Review needed

I would like a review regarding the following code in which I index and search the City model. Currently both solr (with sunspot gem) and elaticsearch (with the tire gem) are show. I am migrating from ...
Bruno Miranda's user avatar
2 votes
0 answers
173 views

2D Array Word Search: Complexity and Optimization

🧩 Objective Determine whether a given word is contained in a 2D Array word search. 🔎 Question 1. What are the time and space complexities of the current algorithm? Time complexity Linear: \$O(2(r * ...
AdamHurwitz's user avatar
2 votes
0 answers
132 views

Trie to index files and search for them

Basic idea (foo and foa are filenames): ...
user227408's user avatar
2 votes
0 answers
433 views

String search function in typescript/angular

I'm trying to return a list of objects called orders based on a string search that the user enters. orders has a ...
Happy Sheep's user avatar
2 votes
0 answers
421 views

React widget to display, sort and search remote data

I've created a React widget that pulls data on crypto-token pairs from a remote API and makes that data sortable by headers and searchable. You can view a demo of it here. Is this a maintainable way ...
J.McLaren's user avatar
  • 121
2 votes
0 answers
2k views

C++ implementation of Monte Carlo Tree Search with Python wrapper

Important Prebuilt Python Extensions built for Python 3.6 Includes Python f-strings (3.6+) Complementary GitHub link https://github.com/thejhonnyguy/CPyMCTS Notable: Previous attempt with stock ...
Luke's user avatar
  • 501
2 votes
0 answers
262 views

Search GitHub users when text field changes in Kotlin Android app

Problem: Search for users by their name using the GitHub API (sorted by the number of followers) and display the results in a RecyclerView. Implementation: Hitting the GitHub API every time when user ...
Ankur_009's user avatar
  • 121
2 votes
0 answers
90 views

Query for searching for the best transportation

I made a website where is possible to search for the best transportation from a place to another. For instance, if I need to go from Berlin to Bremen, the website will search in its internal database ...
Pamela's user avatar
  • 21
2 votes
0 answers
99 views

How to increase concision and performance in a function to retrieve sentences where keywords match?

I'm building a text search system for a web application in PHP. I wrote this function that gets the sentences of the text which contains the keywords used by the user and also highlight them (well, ...
George Marques's user avatar
2 votes
0 answers
80 views

String matching

I recently came across a lecture on DFA. I tried to use it to determine whether a given 'search string' is found in the 'input string'. Please tell me if there is a better way. ...
Rajesh Bhat's user avatar
1 vote
0 answers
354 views

Fast text search in Rust

I have a large file that I want to search for text as fast as possible. There is not a memory contraint, so I am loading the entire file into memory so that I can use the rayon parallelism crate in ...
the_endian's user avatar
  • 1,333
1 vote
0 answers
1k views

Excel VBA - searching PDF using FindText three times per doc

It takes a very long time for some files to be searched. I need to do this with 1000+ PDFs. It seems to be held up during the FindText operation. Any suggestions? ...
minnow1's user avatar
  • 31
1 vote
0 answers
578 views

Setting up a global site search using typeahead

I've written a "clever" bit of javascript that sets up typeahead and bloodhound for use as a global search facility. To make this even more clever, I've stashed a date for when the search JSON that ...
Jarede's user avatar
  • 319