Author name: Admin

Split Linked List Alternatingly

gfg-potd

Given a singly linked list’s head. Your task is to complete the function alternatingSplitList() that splits the given linked list into two smaller lists. […]

1405. Longest Happy String

leetcode-potd

A string s is called happy if it satisfies the following conditions: s only contains the letters ‘a’, ‘b’, and ‘c’. s does not contain any of “aaa”, “bbb”, or “ccc” as a

Two Swaps

gfg-potd

Given a permutation of some of the first natural numbers in an array arr[], determine if the array can be sorted

Delete Alternate Nodes

gfg-potd

Given a Singly Linked List, Delete all alternate nodes of the list ie delete all the nodes present in even positions. Examples

Scroll to Top