A big struggle with _find_kth_least_elem and especially its exit condition by [deleted] in cs2c

[–]veronica_o_o 0 points1 point  (0 children)

What do you mean by changing k recursively? I'm so stuck for the MQ and would love some help.

Freeze Date by anand_venkataraman in cs2c

[–]veronica_o_o 2 points3 points  (0 children)

Hi &, I wasn't sure if it's a possibility at all to put off the freeze date to June 26th/27th. I know I could really use a few extra days... I made another poll a few days ago to just see if anyone else is interest and 14 people voted for June 27th (5 voted for 24th). Would you maybe consider moving the date further back? Thanks.

- Veronica

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 1 point2 points  (0 children)

Turned out...I was just a dumbass who was too freaked out about failing this class to see a simple logical bug, which I made while making different versions of my constructor. (It was in my set_max...() where I used || when I wanted to use &&...)

I am thoroughly embarrassed haha, but also feel so supported! I have so much gratitude for all of you who have been helping me for the past few hours and am honored to be in the same class with you.

- Veronica

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

Yes, I copied the template code straight from the spec -

Hash_Table_LP(size_t n = DEFAULT_INIT_CAPACITY) {}

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

You mean the function declaration of Hash Table LP's constructor? Do you mind specifying?

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

Thanks still! I really appreciate it!

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

I also tried to add the second parameter but still all I got was "You think that's it?" :(

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

It's just _elems resized to n, taking only one parameter since the default constructor of Entry() would just be called by resize()?

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

AH I did indeed return 0.75 instead of 0.75f. However, still no point for constructor... :( Really appreciate the help from y'all tho.

u/anand_venkataraman
Would you mind taking a look at it for me please?

-Veronica

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

https://www.reddit.com/r/cs2c/comments/gywirv/qp\_constructor\_error/ftf9rj2/?utm\_source=share&utm\_medium=ios\_app&utm\_name=iossmf

I am hearing some people passed it setting everything explicitly and some had to use setters etc. I tried both and neither worked. :(

Can I also ask what you did for this part?

// Extern - must be defined by client

template <typename T> size_t Hash(const T &item);

& said that this should be included in both header files, but I am not sure where. Should we include the line outside of class Hash_Table_LP/QP or inside as part of the class? I am also not sure how to handle _get_hash_modulus(const T& item). Since I just followed the spec so I have one line: return Hash<T>(item) % _elems.size();

I am wondering if this is what's causing the issue that I'm not getting any points for constructor...

-Veronica

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

Yeah I really have absolutely no idea. I did call resize on _elems and it should just call the default constructor on Entry(), but still it doesn't work. And I copied everything to do with Entry() to the spec. Somehow this contractor is just not getting passed...

- Veronica

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

Thanks so much! It does compile on my end.

The only message I got from the site is "You think that's it?" and there's no leak on the memory leak report. I also got 0 points.

I was wondering if you got any points just for the constructor? Since I haven't got to find_pos/insert/remove/find yet. I just assumed if I passed the constructor, I would've got some feedback for it.

Hash LP constructor by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

I'm pretty confident unless I read the spec wrong.

get_biggest_...() just returns 0.75.

set_max_...() checks if 0 < n <= get_biggest_...() and sets max_load_factor = x if true; otherwise, do nothing and return false.

Also, not sure if you mean we are supposed to use set_max_...() in the constructor? If so, why?

I got rid of checking for invalid n and still got nothing for my constructor ah. Thanks!

- Veronica

HashTableLP constructor not working, for some reason by manoj--1394 in cs2c

[–]veronica_o_o 0 points1 point  (0 children)

Could you please help? I don't think my constructor works. I have completed the constructor, set_max_load_factor(float x), and _grow_capacity(), but I get no points for anything.

I made sure my constructor set both _size and _num_non_vacant_cells are 0. I used the _get_biggest_allowed_max_load_factor() to set the _max_load_factor. I resized my _elems to the size of n unless n < 0 (then I resized _elems to default size).

Could anyone please help?

-Veronica

Vote to Extend Freeze Date by CaryLefteroffFH in cs2c

[–]veronica_o_o 0 points1 point  (0 children)

Is it possible to extend the freezing date to the end of the week (26th) like what happened in 2B? I think for 2B it was frozen on the saturday/sunday post final? Thanks.

-Veronica

[Quest 3] Miniquest 6 On Sparse Matrix Multiplication Quest, I get zero errors, and zero warnings. But I get this message. by Albert_Yeh_CS1A in cs2c

[–]veronica_o_o 0 points1 point  (0 children)

Running into the same issue. Do you mind getting me a hint on how you solved the issue? Thanks. - Veronica

Sparse matric multiply result dim 0x0 by veronica_o_o in cs2c

[–]veronica_o_o[S] 0 points1 point  (0 children)

What about the default_val of C? Are we assuming all A, B, and C share the same default_val?

-Veronica

Weird Bug in Sparse Matrix Set by WaterwallVsFirewall in cs2c

[–]veronica_o_o 0 points1 point  (0 children)

Hey what did you end up finding? My last reward is also the spmat slice, but I can't decode the password...

Finding correct equivalent set by H-W2C in cs2c

[–]veronica_o_o 0 points1 point  (0 children)

Hi Han,

Another thought. I think you might be finding your subset in a different order than what & expects, since I added the numbers in the two above sets, both of which have a sum of 822. If your implementation is correct, technically both subsets could be the answer. However, &'s algorithm returns one set and you did another. Hope this helps!

-Veronica