u/Secure_Canary_3887

Comparison based sorting complexities

Hey everyone, was just re-reading the decision tree proof for the Omega(n log n) lower bound for comparison sorting and had a random thought.

The standard proof assumes all distinct elements, so you get n! leaves, which gives you the log2(n!) >= n log2(n) - n log2(e) bound.

But what happens if we drop the distinctness constraint and assume a multiset with a known multiplicity vector <k_1, k_2, ... k_m> where the sum of k_i = n? The number of distinct permutations drops to the multinomial coefficient: n! / (k_1! * k_2! * …* k_m!).

Has anyone seen a tight lower bound for online algorithms that adapt to this dynamically *without* knowing the multiplicities ahead of time? Entropy-coded heaps kinda do this, but I'm looking for a pure information-theoretic proof for the competitive ratio. Standard textbooks always seem to skip the multiset edge case and it's bugging me lol.

reddit.com
u/Secure_Canary_3887 — 3 days ago

NEW BABY

Honest opinions but I love her so much!!!!!! She’s vintage and had minimum wear and tear, the only visible is the creases in the leather

u/Secure_Canary_3887 — 3 days ago

Seller "Member Blocked" right after shipping an expensive bag... should I be panicking? 😭

I’m currently spiralling a little bit and really need some perspective. I bought an expensive bag on Vinted and I’m starting to panic. The seller seemed totally legit because they had 39 reviews spanning over several months, so it wasn't like those fake accounts where everything happens in one week. They only sell one-off high-end bags and the photos clearly showed natural wear and tear, which made me feel like they were just a genuine person clearing out a collection.
They marked the item as shipped three days ago, but when I went to check the tracking today, their profile has that dreaded red "Member blocked" banner. Now I’m terrified. Does this mean I’ve been scammed? Or is it possible Vinted just blocked them for something like "commercial selling" because they list so many high-value items?
I’m worried the photos might have been fake even though they looked so real, or that they didn't actually send the bag. It’s definitely a site-wide ban and not them personally blocking me. Has anyone else had a seller get banned right after shipping something expensive? If the parcel actually arrives, how do I make sure I’m protected? I’m definitely going to film the unboxing, but I’m just so stressed that my money is gone. Please help!

reddit.com
u/Secure_Canary_3887 — 14 days ago
▲ 4 r/relationshipproblems+1 crossposts

We’ve technically been dating for a year, but we were “seeing each other” for almost another year before that. Before meeting him, I never imagined myself dating an older guy. Even now, if one of my 22-year-old friends told me she was dating a 28-year-old, I’d probably question it a little. It just was never something I pictured for myself.

But when I met him, I was in a really vulnerable place emotionally, and he felt like everything I needed at the time. He has this very soft, adventurous, almost childlike spirit not immature exactly, but emotionally warm, funny, curious, affectionate. He doesn’t feel hardened or emotionally dry. That’s a huge part of why I fell for him.

The issue is that as I’m getting older and finishing university, I’m starting to feel scared about our future.

I’m someone who is very driven and future-oriented. I think a lot about career goals, where I want to live, what kind of life I want, etc. Meanwhile, he seems completely stagnant. He works a physically demanding job he doesn’t enjoy, gets treated badly there, and never talks about wanting more for himself. Not even necessarily some huge ambitious dream just a plan. Any plan. Growth. Direction. Something.

I’ve encouraged him to apply for promotions, explore other options, think longer-term, and he just… doesn’t. It feels like he’s plateaued at 28 while I’m only now starting to accelerate into adulthood.

And I think that’s making me question the relationship in ways I avoided before.

Part of me wonders if being with someone younger allows him to avoid bigger commitment conversations for longer. Like if I were also 28, maybe marriage/future/life planning would already be on the table in a more serious way. But because I’m 22, everything can stay vague and undefined without it looking unusual.

What also confuses me is that early on, he didn’t always act like someone who really liked me that much. There were very high highs and very low lows. He cancelled on me a lot when we first started dating, sometimes for reasons that honestly made me feel unimportant. I’d spend hours getting ready to see him just for plans to get cancelled last minute over things that didn’t feel urgent. Back then I ignored it because I was excited, inexperienced, and really wanted it to work.

Now I look back and wonder if I missed signs that he just wasn’t fully invested from the beginning.

To be fair, our relationship now is much more stable and loving than it was then. But there’s always been this underlying doubt in me that never fully leaves. I genuinely cannot tell whether it’s intuition or anxiety.

And I know the obvious answer is “communicate with him,” but it’s difficult because he’s very emotionally sensitive. I worry that bringing this up would completely shut him down or deeply hurt him.

I think what I’m really asking is: how do you tell the difference between a relationship that’s genuinely wrong for you versus your own fear/self-sabotage/perfectionism kicking in?

Has anyone older been through this transition in their 20s where you suddenly started seeing your partner and your future differently?

I really need perspective from people who’ve actually lived through this stage of life.

reddit.com
u/Secure_Canary_3887 — 15 days ago
▲ 111 r/leetcode

I had an interview for a swe internship and fucked it up so bad. They probed so hard on behavioural questions and I just had to admit I didn’t know. The leetcode was a nightmare. First question I have a working solution that’s not optimal and would not work globally. I try and get some extra points by reasoning about time complexities and edge cases. Interviewer tells me to not bother with any of that and just code. Then get given another input that “should break the logic”. It did not and it still gave the right output. It’s so confusing like I got the hints that I was expected to optimise I just didn’t know how. Second question is actually insane. Hardest leetcode question I’ve ever laid my eyes on but with help came to an optimal solution however the code is not production ready or syntactically correct. Worst interview ever. Left so confused. How does one just perfect the art of interviews I never know what’s coming for me.

reddit.com
u/Secure_Canary_3887 — 18 days ago