Pages

Friday, July 4, 2025

isEmpty() in Linked List in C++

int isEmpty(Node* top) {
    return (top == NULL); // return (!top);

}


No comments:

Post a Comment

remove duplicates from sorted array - two pointer approach (leetcode)

  class Solution {     public int removeDuplicates ( int [] nums ) {         // base case: return if array have no el.         if ( nums...