Need help on a hash task.

Правка en1, от Transparent_heart, 2024-12-05 17:27:43

Hello everyone! Recently, I've been having trouble with a hash task.

The task

I also have two questions:

  1. How can we solve it by using hashing?
  2. Are there any suitable solutions other than hashing?

Update when I'm done typing: I've just come up with a solution using the two pointers method. It's not funny. I was stuck on it for hours! But I still wonder if hashing works.

Теги hashing, two pointers

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский Transparent_heart 2024-12-05 17:27:43 873 Initial revision (published)