We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问这个例子是面向结果编程吗。 还是说贪心算法, 本就有可能得不到正确答案(即使用其它算法有解)。 例如带入 coinChangeGreedy([40,60,70],100) 去算,返回值为-1。 抛开时间复杂度和空间复杂度不谈,为什么得不到解,有点面向结果编程的意思。
The text was updated successfully, but these errors were encountered:
Hi @yuadh , 这节后面的内容有介绍, 有些问题不适合使用贪心处理。对于硬币找零问题,在某些硬币组合下,贪心算法才可以得到最优解。
Sorry, something went wrong.
No branches or pull requests
请问这个例子是面向结果编程吗。 还是说贪心算法, 本就有可能得不到正确答案(即使用其它算法有解)。 例如带入 coinChangeGreedy([40,60,70],100) 去算,返回值为-1。 抛开时间复杂度和空间复杂度不谈,为什么得不到解,有点面向结果编程的意思。
The text was updated successfully, but these errors were encountered: