Skip to content
View ruhilmansi's full-sized avatar
:octocat:
still fine tuning
:octocat:
still fine tuning
  • localhost:8080
  • 02:09 (UTC +05:30)

Block or report ruhilmansi

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.

Maximum 250 characters. Please don't include any personal information such as legal names or email addresses. 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
ruhilmansi/readme.md

i'm mansi, cs undergraduate at banasthali vidyapith. lately I’m into low level stuff (learning rust) and building things with <code/> sometimes it works, sometimes it doesn’t.

mail- mail me
portfolio- portfolio
linkedin- linkedin


Open Source

my cute lil' hashmap <3 (O(1) always)

class HashMap:
    def __init__(self):
        self.bucket = []
        for i in range(7):  
            self.bucket.append([])  
        print("hashmap initialized cause built in is too basic")
        # i genuinely love HashMaps <3

    def put(self, key, value):
        index = hash(key) % len(self.bucket)
        for i, (k, v) in enumerate(self.bucket[index]):
            if k == key:
                self.bucket[index][i][1] = value
                print(f" Updated: '{key}' now maps to '{value}'")
                return
        self.bucket[index].append([key, value])
        print(f" Added: '{key}' → '{value}' 'cause i love mapping stuff <3 ")

    def get(self, key):
        index = hash(key) % len(self.bucket)
        for k, v in self.bucket[index]:
            if k == key:
                print(f"Found: '{key}' → '{v}' just like finding answers in life")
                return v
        print(f"Oops: '{key}' not found. doesn’t exist in the map")
        return None

    def remove(self, key):
        index = hash(key) % len(self.bucket)
        before = len(self.bucket[index])
        self.bucket[index] = [pair for pair in self.bucket[index] if pair[0] != key]
        after = len(self.bucket[index])
        if before != after:
            print(f"Removed: '{key}' (if it existed)")
        else:
            print(f"'{key}' wasn’t even here. nothing to remove")

coverTop languages

Pinned Loading

  1. fail-u-forward fail-u-forward Public

    community driven platform where failure is not something to hide but something to celebrate : all the stuff LinkedIn filters out

    TypeScript 23 87

  2. dynamic-parking-py-bokeh-pricing dynamic-parking-py-bokeh-pricing Public

    dynamic pricing for urban parking lots with python and bokeh

    Jupyter Notebook

  3. cli-blockchain cli-blockchain Public

    Rust

  4. mario-run-js mario-run-js Public

    practicing JS by building a mario run clone

    JavaScript