Leetcode

Finding all Subsets of a given set

Hi Geeks! Welcome to 100 Days Leetcode Challenge. Day 3 In this article, I’ll explain about how to find all the subsets of a given set(power set). Here is our given problem, Given a set of distinct integers, nums, return all possible subsets. Note: The solution set must not contain duplicate subsets. Example: Input: nums = [1,2,3] Output: [ [3], …

Finding all Subsets of a given set Read More »

4) Remove Zero Sum Consecutive Nodes from Linked List

Hi geeks! In this article, we going to play with Linked list and hash map by solving this interesting problem remove Zero Sum Consecutive Nodes from Linked List. Given the head of a linked list, we repeatedly delete consecutive sequences of nodes that sum to 0 until there are no such sequences. After doing so, return the head of …

4) Remove Zero Sum Consecutive Nodes from Linked List Read More »

C# Program to Reverse Integer

Given a 32-bit signed integer, reverse digits of an integer. Example 1: Input: 123 Output: 321 Note:Assume we are dealing with an environment which could only store integers within the 32-bit signed integer range: [−231,  231 − 1]. For the purpose of this problem, assume that your function returns 0 when the reversed integer overflows. Required …

C# Program to Reverse Integer Read More »