add better answer for #844
add better answer for #844

o-jules/LeetCode-Problems,o-jules/LeetCode-Problems,o-jules/LeetCode-Problems,o-jules/LeetCode-Problems,o-jules/LeetCode-Problems,o-jules/LeetCode-Problems