why is hashing important
Why is hashing important
for O(1) find functions.
because it would be stupid to transmit a password in a reversible format
>O(1)
do you mean O(log n)?
No.
Hash tables are O(1) for search, insert, and delete.
without it my pipi cant get up
Wrong. Worst vase scenario is O(N)
it just represents data of variable length in a non-reversible, unpredictable(But not random) way. It's important when you come up with a use for it ;p.
>Worst vase scenario
Nigga this ain't Intro to Data Structures.
We work with average case.
If your hash function is return 1
does every single string have a unique hash code?
Why don't we ever consider median case?
Didn't this little hoe fuck her dad?
because then if the password database is exposed the passwords aren't definitely compromised
but we do? it depends on the distribution of the data. Most distributions we see tend to be bell curves, in which case, average works just fine. but if the distribution is shifted to the right or the left, then median is often used (along with average).
>her
I see you didn't actually watch the scene
depends on the hashing algorithm. in most scenarios in >current technology, yes, collisions are a non-issue.
it's also what makes blockchains possible.
We basically do. It's called amortized analysis.
Not blood related so it's okay
ewwww
to safely transfer passwords over unsafe connections
to get a short representation of files (M5D)
also used for asymmetric encryption
among other things
>implying that doesn't make it better
You're on Sup Forums
O(1)
This seems so nice. But it is a lie. First search requires computation of hash. Second buckets.
>First search requires computation of hash
Which is O(1)
>Second buckets.
Which is also O(1)
What's O(1) + O(1) ?
O(1)
>But it is a lie.
It's not. Unless you're studying the complexity on a logarithmic cost model, that is the one used in computational complexity.
It is also really really fast in practice if you're capable to choose the right hash function algorithm for your job and tune it opportunely.