[Solved] C# Full-text search string format : string remove all adjacent duplicates and append with ‘AND’ ‘OR’ [closed]

Since you haven’t shown what you’ve done so far I’m assuming that you haven’t started on a solution, so here’s a high level algorithm: In that case, use String.Split(‘ ‘) to split the searchstring by each space. Use a foreach loop on the resulting array of strings and use string concatenation to complete, if a … Read more

[Solved] algorithm removing duplicate elements in array without auxillay storage

OK, here’s my answer, which should be O(N*N) worst case. (With smaller constant, since even worstcase I’m testing N against — on average — 1/2 N, but this is computer science rather than software engineering and a mere 2X speedup isn’t significant. Thanks to @Alexandru for pointing that out.) 1) Split cursor (input and output … Read more