Have you ever faced any problem in a technical interview with difficulty more than DIV2 D/E? I once faced a maxflow problem. Please share the most difficult/challenging problem you faced in an interview.
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
Have you ever faced any problem in a technical interview with difficulty more than DIV2 D/E? I once faced a maxflow problem. Please share the most difficult/challenging problem you faced in an interview.
I have a tuple T, consisting of
What can be the most efficient way to store such tuple T = < id, score1, score2, x > given that only 5 digits after the decimal are sufficient for score1 and score2.
Currently, I am storing this tuple as a long which takes 8 bytes of memory. 27 bits for id, 17 bits for score1, 17 bits for score2 (considering values upto 5 decimal digits), and 2 bits for x, Overall 63 bits.
I'm trying to optimize the memory usage as there are millions of such tuples in an array. Also, If your way can store digits more than 5 decimal places, please tell me.
Is there a way, by which we can store the tuple T using float or some other data type? given that if the tuple is hashed to float, I should be able to get back id, x accurately and score1, score2 without much errors.
Thanks for your time, have a nice day.
Hello, codeforces community
What is the most efficient way to store the such matrix, given that I'll get the queries like:
Currently I'm storing the matrix in CSR format. Which takes an integer array of size NNZ and another array of size N.
Which is taking
The overall memory to store such structure is about 3.5GB.
I want to compress it in a way such that the memory consumption is reduced and the queries can still be fast. I am looking for some kind of serialization technique or something which can reduce the memory consumption or time complexity.
Any help regarding this is most welcome.
The two Pointer algorithm is quite popular technique. Although the idea is straightforward, Its implementation is prone to bugs. Few such bugs includes:
How to write in a way such that there is less chances of bugs?
This blog is a sister blog of Binary Search Elegant Implementation. Your thoughts and implementations are valuable to community, hence welcome.
Thanks. Have a great time ahead!
Name |
---|