About the pointer variable of node class

why is the pointer variable of node class defined in that way ? the * should come after the data type T but why is the syntax written the opposite way in the code?

hello @Senjuti256

next is a pointer right?
pointer of what type ?it is of type Node< T > right?
that is why inn declaration we have written Node< T > *next; (next is pointer name, * is indication that it is pointer , Node< T > is datatype )

why is the data type node(T) ,it should have been node only? Like in LL we use only node* next and don’t mention any data type of the node thn why are we using T over here?

no our node class is templated now, so saying node is datatype is incomplete ,
node< int> ,node< char> or node< t > will be called as datatype

we want to make of class generic ie we want it to work for each type of T (int,char ,float etc) ,that is why we are using T (a placeholder)

so if we want to make our LL class generic do we need to follow the same syntax?

yes … . …