Skip to content
View Vivallo04's full-sized avatar
🐙
Lambda
🐙
Lambda

Highlights

  • Pro

Block or report Vivallo04

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Vivallo04/README.md

Hey! 🙋🏻‍♂️Vivallo here!

I am a Software Engineer

Here are some of my interests and what I'm currently working on:

  • 🎆 Working @ Lambda
  • 💭 You can contact ping me on LinkedIn or contact me at [email protected]
  • 🎮 I have fun developing games (taking a break for now) and doing full-stack development
  • 🤓 Oh! I almost forget. Here's a link to my dotfiles (I use Arch btw)
  • 💘 I am currently focusing on AI integration and full-stack applications (and classical music too)

LeetCode Challenge of the Day ⚛

Sum of All Subset XOR Totals

The XOR total of an array is defined as the bitwise XOR of all its elements, or 0 if the array is empty. Given an array nums, return the sum of all XOR totals for every subset of nums. An array a is a subset of an array b if a can be obtained from b by deleting some (possibly zero) elements of b.

My Solution

class XORSubsetCalculator:
    @staticmethod
    def subset_xor_sum(nums: List[int]) -> int:

        if not nums:
            return 0
            
        n = len(nums)
        total_sum = 0
        for subset_mask in range(1, 1 << n):
            xor_total = 0
            
            # Process each bit position
            for i in range(n):
                if subset_mask & (1 << i):
                    xor_total ^= nums[i]
            
            total_sum += xor_total
            
        return total_sum

Note: Leet Code challenges update once a week😉

My Statistics

Pinned Loading

  1. MathSockets MathSockets Public

    MathSockets is a board game for two online players

    Java 1 1

  2. c-ide c-ide Public

    A cross-platform and lightweight IDE for a custom interpreted language

    C++ 1

  3. house-party house-party Public

    Full-stack web app using Django and React. You can create different rooms and listen to music with your friends using the Spotify API.

    Python

  4. dotfiles dotfiles Public

    A collection of my dotfiles for UNIX-based systems

    Shell 5