Articles for author: Daksh

Insertion in linked list

Modify a Linked List by inserting a new node at the front, after a specified node, and at the end. These operations offer flexibility in updating the structure based on specific needs, enabling dynamic adjustments to the Linked List. Insertion at the Beginning of the Linked List Insertion at the Beginning of the Linked List ...

kth Smallest Element

Problem Statement We are given an integer array nums and an integer k. We have to return the kth smallest element in the array where $k <=$ size of nums. Also, note that we have to return the $kth$ smallest element not the kth distinct element. Example Example Explanation If we sort the above array, ...