Algorithmic efficiency for transaction lookup in blockchain Since bitcoin uses binary Merkle trees (just learned that), I want to know what would be the algorithmic efficiency for transaction lookup in the blockchain.

I don't know exactly how the data structure underneath the blockchain is organized.

AFAIK, each block contain a single Merkle tree, which can be related to the previous block tree by the prevId field in its own block header.

Given all that, I was wondering if, given a TXID, I would be able to locate that transaction in the blockchain in logarithmic time (O(log2 n)) as just a simple tree traversing, or if there are some hidden details I'm not considering.
No, you can't. The block chain is a linked list of blocks, and each block contains an array of transactions. Block headers commit to a Merkle tree of the transactions in them, but they are sorted chronologically, not by txid, so you need a linear search. If you want to find a transaction in a block quickly, you'll need an external index data structure.

There is however also no need for that in normal operation of a Bitcoin node or wallet.

For verification, a set (which is internal to the operations of a node, and not part of the block chain) of unspent transaction outputs is maintained, indexed by txid (the so-called UTXO set). This set represents the 'state' of the ledger at a given point in the block chain, and blocks can be seen as 'patches' to the UTXO set: transaction inputs remove ("spend") entries from the UTXO set, and transaction outputs create new ones.

Wallets maintain their own set of transactions relevant to the user's balances. These are typically indexed, but much smaller than the set of all transactions in the blockchain, and often just kept in memory.