quiz حل الأسئلة الجامعية manage_search الأرشيف

تم الحل ✓
categoryبرمجة وتطوير البرمجيات schoolبكالوريوس event_available2026-07-14

السؤال

Transcribed Image Text:

3. You are given an array of string and an array of patterns. Your task is to check that for every i and j, the strings and patterns should be the same i.e. strings[i] strings[j] and patterns[i] = patterns[j] Write a function to return True or False. Example: strings ["Python", "Programming", "Programming"] and patterns = ["x", "y", "y"] Solution: True strings = ["Python", "Programming", "Class", "Programming"] and patterns "y","y"] Solution: False = ["x", "y", Explanation: In 1st example, strings [2]-strings [3] and patterns [2]-patterns [3] => True In 2nd example, strings [2] != strings [3] != strings [4] and patterns [2] patterns [3] = patterns [4] => False

check_circle الجواب — حل مفصل خطوة بخطوة

hourglass_top