# Run time complexity for inserting a node in the Linked List at the end

**URL:** <https://forum.codewithmosh.com/t/run-time-complexity-for-inserting-a-node-in-the-linked-list-at-the-end/21258>\
**Category:** Data Structures\
**Created:** [July 4, 2023, 2:20pm UTC](https://forum.codewithmosh.com/t/run-time-complexity-for-inserting-a-node-in-the-linked-list-at-the-end/21258 "2023-07-04T14:20:25Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karnasinh](https://avatars.discourse-cdn.com/v4/letter/k/58956e/32.png) [@Karnasinh](https://forum.codewithmosh.com/u/Karnasinh)\
**Post date:** [July 4, 2023, 2:20pm UTC](https://forum.codewithmosh.com/t/run-time-complexity-for-inserting-a-node-in-the-linked-list-at-the-end/21258/1 "2023-07-04T14:20:25Z")

</div>

Hello Everyone,

In the Data Structure Course for Linked List topic there is one mistake on “2-What are linked list (4:22)” video at 1:55 time stamp.

For the Linked List if we want to insert the node at the end then run time complexity would be O(n) as we need to create a node O(1) then referencing tail to new created node O(1) then finding last node O(n) then referencing that last node to newly created node O(1) so \>\> O(1) + O(1) + O(n) + O(1) = O(n).

Can anyone please correct me if I am wrong?

Thank you.
