DEV Community

Cover image for Day 11/366
vishal.codes
vishal.codes

Posted on

Day 11/366

šŸš€ Today's Learning:

šŸŒŸ DSA

  • Insert Node at beginning of Linked List
  • Delete Last Node of Linked List

šŸŒŸ Dev

  • Agile Methodologies
  • Git branching

šŸ” Some Key Highlights:

DSA

Insert Node at beginning of Linked List - Create a new node (say newNode). Make newNode ā†’ next point to head. Make head point to newNode (as this is the new head). T.C & S.C ā†’ O(1)

Image description

Delete Last Node of Linked List

Move to the second last node and make it null. Also delete the last node (only in C++. In python, Java and JavaScript this need not be done as this is done automatically by garbage collectors). Also check for empty list or just one node. Return null in this case.

Image description

DEV

  1. git branch -vv:
    • This command lists all local branches along with extra information.
    • vv stands for "verbose" and "verbose", which provides more detailed information about each branch.
    • Specifically, it shows the name of each branch, the commit it points to, and whether the branch is tracking a remote branch.
  2. git branch -vv -a:
    • This command lists both local and remote branches, along with additional information.
    • a stands for "all", which includes remote branches in addition to local branches.
    • So, this command provides a comprehensive view of all branches in the repository, both local and remote, along with detailed information about each branch, such as the commit it points to and whether it's tracking a remote branch.

#100daysofcode #1percentplusplus #coding #dsa

Top comments (2)

Collapse
 
jroycodes profile image
Jonathan R. Mugisha

Good stuff man

Collapse
 
vishalmx3 profile image
vishal.codes

Thanks man !