Tag: data structure
I am recently reviewing the data structure & algorithms. And the hash table is one of the key knowledge that you can’t miss before you attend a coding interview. …
A Sparse Matrix (SM) is a popular data structure that is used to stored two-dimension Matrix when the total the empty/zero elements are the majority in the matrix. For …
Two strings are both lowercase letters. Write a function to determine if one string can be constructed using the letters from the other string. For example: canConstruct("aa", "ab") = …
You are asked to remove all elements of value val from a integer linked list. For example, Remove 2 from the following list, 1 -> 2 -> 2 -> …
Question: How to determine if a linked list has a cycle? The Singly Linked List is defined as follows: struct ListNode { int val; ListNode *next; ListNode(int x) : …