php-trie-ext icon indicating copy to clipboard operation
php-trie-ext copied to clipboard

Trying simple insert but nothing is added to the trie object

Open rvencu opened this issue 5 years ago • 8 comments

`$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

rvencu avatar Sep 25 '20 17:09 rvencu