Flowchart (ISO 5807)
Source code
C#
class Program {
static bool IsAnagram(string a, string b) {
if (a.Length != b.Length) {
return false;
}
int[] count = new int[256];
for (int i = 0; i < a.Length; i++) {
count[a[i]]++;
count[b[i]]--;
}
for (int c = 0; c < 256; c++) {
if (count[c] != 0) {
return false;
}
}
return true;
}
}The editor opens with this code — change it and the chart redraws.
- Language
- C#
- Constructs
- character counting
- Topic
- Algorithms
- Formats
- Word, Visio, draw.io, PDF, SVG