Rotate a Linked List

gfg-potd

Given the head of a singly linked list, your task is to left rotate the linked list k times. Examples: Input: head = 10 -> 20

Reverse a linked list

gfg-potd

Given the head of a linked list, the task is to reverse this list and return the reversed head. Examples: Input: head: 1 ->

2683. Neighboring Bitwise XOR

leetcode-potd

A 0-indexed array derived with length n is derived by computing the bitwise XOR (⊕) of adjacent values in a binary array original of length n. Specifically, for each index i in the range [0,

Product array puzzle

gfg-potd

Given an array, arr[] construct a product array, res[] where each element in res[i] is the product of all elements in arr[] except arr[i]. Return this resultant array, res[].Note: Each

2425. Bitwise XOR of All Pairings

leetcode-potd

You are given two 0-indexed arrays, nums1 and nums2, consisting of non-negative integers. There exists another array, nums3, which contains the bitwise XOR of all pairings of integers

2429. Minimize XOR

leetcode-potd

Given two positive integers num1 and num2, find the positive integer x such that: x has the same number of set bits as num2, and The value x

Scroll to Top