Delete a particular item in a queue without using delete method

In reply to dave_59:

In reply to rlraj_2020:
I don’t agree with that explanation. Queues are the best kind of array for adding or deleting one element at a time. While it might be true that accessing (reading or writing) an element in the middle queue might be less efficient than other array kinds, having to reconstruct the entire queue because an element gets added or deleted is going to be less efficient. It would be much better to write this as

module test();
int q[$] = {12,3,45,23};
int b[$]; // all 'find' methods return a queue in case nothing is found.
initial begin
b = q.find_first_index(x) with (x==45);
if (b.size() == 1) q.delete(b[0]);
end
endmodule

Thanks for the explanation, but here the delete method is used which is not expected.