you have to be extremely talented to be a software engineer so I see that as way more complex and cool.
Answer:
subset([],[]).
subset([X|L],[X|S]) :-
subset(L,S).
subset(L, [_|S]) :-
subset(L,S).
Success:
subset([1,3], [1,2,3]).
subset(X, [1,3,4]). % error handling to compare sets in a given order
Fail:
subset([2,1], [1,2,3]). % compares in a different order from the first.
Explanation:
The function "Subset" in the source code above accepts two sets, then checks if the first set is a subset of the second. The code returns true if the condition is met.
Answer: this is the Answer your question
Answer:
1. Write through
2. Write back
3. Write back
4. Write through.
Explanation:
The answers are given accordingly as above.