1. Write a function to calculate the factorial of a number.
2. Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree. The lowest common ancestor is defined between two nodes p and q as the lowest node in T that has both p and q as descendants (where we allow a node to be a descendant of itself).
3. Given a linked list, remove the nth node from the end of the list.
4. All components of social media application.