سؤال محلول لكل مجال من المجالات الرسمية الـ 8 في علوم الحاسب، من بنك مبني على المعايير الأكاديمية للهيئة. حُلّها هنا، ثم تدرّب على المجموعة الكاملة — مع مراجعة متباعدة واختبارات موقّتة — في التطبيق.
A software engineer must implement a data structure that supports the following operations on a collection of distinct integer keys: insert a key, delete a key, search for a key, and retrieve the predecessor of a given key (the largest key strictly smaller than the given key). The application frequently performs all four operations, and the keys are drawn from a large range. A colleague suggests using a hash table with separate chaining, claiming that its expected O(1) average time for insert, delete, and search makes it the best choice. Which statement correctly analyzes why a balanced binary search tree is actually the more appropriate implementation for this workload?
اختر إجابة لتختبر نفسك.
لماذا
تتطلب عملية predecessor ترتيب المفاتيح؛ شجرة البحث المتوازنة توفّرها بـ O(log n) بينما جدول التجزئة لا يستطيع ذلك بكفاءة.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 02 · بنية الحاسوب وتنظيمه
A 8-bit ALU adds the two's complement values 0x6B and 0x5A and stores the low 8 bits in an 8-bit register. Which statement best analyzes the result and the flags it should set?
اختر إجابة لتختبر نفسك.
لماذا
107+90 = 197 = 0xC5 دون حمل خارجي (carry = 0). لكن 0xC5 في المتمم الثنائي = −59، فعددان موجبان أعطيا نتيجة سالبة → تجاوز مُوقّع = 1. الخيار B.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 03 · الهياكل المتقطعة
In a breadth-first traversal of a tree starting from the root, which data structure is typically used to keep track of nodes to visit?
اختر إجابة لتختبر نفسك.
لماذا
المسح بعرض الشجرة يعالج العقد مستوى بعد مستوى؛ والطابور (FIFO) هو البنية القياسية.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 04 · إدارة المعلومات
A database designer is describing the relational data model to a new team member. Which statement best explains the principle that underlies the relational model?
اختر إجابة لتختبر نفسك.
لماذا
يمثّل النموذج العلائقي البيانات كعلاقات (جداول)، حيث تكون كل علاقة مجموعة من الصفوف (tuples) وقيم كل سمة مأخوذة من نطاق (domain) محدد، وتُعبَّر الارتباطات عن طريق مطابقة قيم المفاتيح لا عبر المؤشرات. الخيار B هو الوصف الصحيح، بينما A يصف النموذج الكائني وC الهرمي وD الشبكي.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 05 · الشبكات
A small company network consists of three departmental LANs, each connected to a central router. This central router also connects to an ISP router, which forwards traffic across the public internet to a remote web server. A network engineer labels each device as either an edge or core component according to the standard internet structure model. Which classification is correct?
اختر إجابة لتختبر نفسك.
لماذا
في نموذج الحافة/القلب تُعدّ الشبكات المحلية (الأنظمة الطرفية وشبكات الوصول) الحافة، بينما تنتمي الموجّهات التي تمرّر الحركة عبر العمود الفقري للإنترنت — وهنا موجّه ISP — إلى القلب. الخيار B يعبّر عن ذلك.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 06 · أنظمة التشغيل
A device driver maintains a single I/O request queue for a disk. The queue is currently empty. Requests arrive in this order: X (service time 8 ms), Y (service time 2 ms), Z (service time 6 ms). The driver uses Shortest Job First (SJF) scheduling, which selects the request with the shortest service time from those currently waiting. When X arrives, it begins service immediately. While X is being served, Y and Z arrive and wait. After X completes, which request is served next and what is its waiting time?
اختر إجابة لتختبر نفسك.
لماذا
يُخدَم X أولاً (8 ms)، ويتراكم Y وZ في الطابور خلال ذلك. عند انتهاء X، يختار SJF المتطلب Y (2 ms) بدل Z (6 ms). ويكون Y قد انتظر منذ وصوله (خلال خدمة X) حتى t = 8 ms، فيكون زمن انتظاره 8 ms.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 07 · لغات البرمجة
A class `Temperature` stores a Celsius value in a private field `celsius`. The class provides a public method `setCelsius(double c)` that assigns the value but does not validate it. A client program sets `celsius` to −300 using this method. Which change best applies encapsulation to prevent invalid states, without exposing the internal field?
اختر إجابة لتختبر نفسك.
لماذا
أبقِ الحقل خاصًّا وطبّق التحقق داخل الدالة المُعيِّنة، برفض القيم دون الصفر المطلق؛ فهذا يحفظ التغليف ويمنع الحالات غير الصالحة.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
المجال 08 · هندسة البرمجيات
A bank is adopting an agile process for a mobile banking app. The team plans two-week iterations with a prioritized backlog and a demo at the end of each iteration. Which characteristic of agile processes does this plan most directly illustrate?
اختر إجابة لتختبر نفسك.
لماذا
التكرارات القصيرة والـ backlog المرتَّب بالأولوية والعروض في نهاية كل تكرار تجسّد التسليم التكراري والتدريجي مع التغذية الراجعة المستمرة من العميل، وهي السمة الأساسية للـ agile.
نموذج — المجموعة الكاملة، مع المراجعة المتباعدة والاختبارات، في التطبيق.
تدرّب على أسئلة علوم الحاسب في التطبيق.
أنشئ حساباً مجانياً: تجربتك المجانية 50 سؤال تدريب واختبار موقّت واحد، دون بطاقة ودون حد زمني. كل سؤال يشرح سبب صحة كل خيار أو خطئه.