Skip to content

Trying simple insert but nothing is added to the trie object #2

@rvencu

Description

@rvencu

`$trie = new Trie;
$rtrie = new Trie;

	$wordCount = 0;
	foreach ( $wordData as $word ) {
		if ( $word > '' ) {
			$trie->insert( $word );
			$rtrie->insert( strrev( $word ) );
			++ $wordCount;
		}
	}`

I have a collection of 38000 items (composed of one or more words) that I am trying to add to trie but nothing happens with the above code

I also tried this variation
$trie[$word] = $word

but in this case, the page returns error 503 (server too busy)

both versions are NOT producing any PHP error inside the error log

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions