Design Question | Microsoft | Suggestions?

I saw this on GFG

Design the data structure such we can perform operation
insertFirst(value):- value inserted head of the list Time Complexity O(1)
insertLast(value):- value inserted last of the list Time Complexity O(1)
deleteValue(val):- delete the value from the list if the list contains multiple values then it should delete only first occurrence expected time complexity O(1).
isExist(value):- return the true if value exist in the data structure otherwise false, expected time complexity O(1)

Any Ideas?

Comments (2)