עבור לתוכן
View in the app

A better way to browse. Learn more.

HWzone

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

ג'אווה - hash code

Featured Replies

פורסם

מה זה בדיוק hash code?

איך זה עובד?

איך אפשר לממש hash table?

ודבר אחרון: מה זה load factor?

(במילים אחרות: לא הבנתי כלום בנושא :) :) :) )

תודה על העזרה!

פורסם

פונקציית ה-hashcode היא פונקציה שמחזירה לכל אובייקט מספר ייחודי. המספר הזה צריך לקיים מספר תכונות:

1. אם שני אובייקטים הם זהים (כלומר, שימוש בפונקציה equals תחזיר אמת) אז הם צריכים להחזיר אותו hashcode.

2. ייחודיות - הסיכוי שלשני אובייקטים שונים (כלומר, כאלו ש-equals תחזיר עבורם שקר) יהיה אותו hash code הוא קטן.

3. קונסיסטנטיות - אם קוראים לפונקציה פעמיים בלי לשנות את האובייקט, היא צריכה להחזיר אותה תוצאה.

טבלאות האש (ובעברית גיבוב) זה נושא שלם באלגוריתמיקה.

http://he.wikipedia.org/wiki/%D7%98%D7%91%D7%9C%D7%AA_%D7%92%D7%99%D7%91%D7%95%D7%91

Load factor זה היחס בין גודל טבלת ההאש למספר האיברים שבה.

ארכיון

דיון זה הועבר לארכיון ולא ניתן להוסיף בו תגובות חדשות.

דיונים חדשים

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.