void inorder(Node* root) {
if (root == NULL) return; // ✅ base case handled
inorder(root->left); // 🡐 left
cout << root->data << endl; // 🡐 root
inorder(root->right); // 🡐 right
}
class Solution { public int removeDuplicates ( int [] nums ) { // base case: return if array have no el. if ( nums...
No comments:
Post a Comment