Bitcoin check if the transaction is valid When a node receives a new transaction, that node will check if the one broadcasting the transaction has enough coins to initiate it. Bitcoin follows a UTXO model, therefore the node has to check in the past if the sender has enough coins. 

Is this check linear in time? Where can I read to know more about it?
The Bitcoin Network does not keep track of 'account balances', instead it uses an 'unspent transaction output' model. Each node will keep an updated list of all unspent transaction outputs (UTXOs), so that when it hears about a new transaction, it can verify that the transaction is only spending valid UTXOs. This check is done quite simply: the UTXOs used in the transaction must be present in the node's UTXO set. If the transaction attempts to spend a UTXO that does not exist (ie, 'insufficient balance'), then the transaction will be rejected as invalid.

See these questions for more information:

How is a wallet&#39;s balance computed?

Where is the UTXO data stored?

How big is the UTXO database?

How can a miner verify that a UTXOs is not spent elsewhere?

Why does Bitcoin store all transaction inputs and outputs, instead of just an &quot;account/balance&quot; ledger?