We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Algorithms
- Strings
- Anagram
- Discussions
Anagram
Anagram
Sort by
recency
|
976 Discussions
|
Please Login in order to post a comment
include
include
using namespace std;
/*Think of it this way: e.g.xaxb|bbxx left : 2x 1a 1b right: 2x 0a 2b , and they cancle out. What is left in the right is the answer.
O(n) per query*/
int arr[26];
int main() { ios::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr);
}
Minimalist O(n) solution:
rust answer