我怎样才能学会如何解决这样的其他算法的问题? [英] How can I learn how to solve other algorithms problems like this?

查看:113
本文介绍了我怎样才能学会如何解决这样的其他算法的问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这可能是有点OT ......

下面的问题: N个不同的点整数坐标以一个平面上。你要编写一个程序,发现共线点的最大数量(它们都属于同一条线路)。

现在我的问题:你不必来解决这个对我来说,不是我想知道在哪里可以找到一些材料来学习如何解决这样的问题。这大概的几何体有关,我没有真正深入到几何,所以我想读了一些建议,哪些书是好的,在那里我能找到任何教程为解决这类问题等等等等。

解决方案
  

在哪里可以找到一些材料来学习如何解决这样的问题。

不幸的是,解决算法问题,最喜欢的数学问题,是深入到你的工具箱中,并使用你所知道的问题。非常相似的问题可以得到解决的完全的方式不同,有经验的知道,如果有问题可以得到解决的一种方式或其他,或者没有规则,甚至都没有。

以最好的方式开始,然后,将是建立你的工具箱

This may be a bit OT...

Here's the problem: "N different points with integer coordinates are given in a plane. You are to write a program that finds the maximum number of collinear points (they all belong to the same line)."

Now my question: You don't have to solve this for me, instead I want to know where I can find some materials for learning how to solve problems like this. This is probably geometry related and I'm not really deep into geometry so I'd like to read up some advices, which books are good, where I can find any tutorials for solving such problems etc. etc.

解决方案

where I can find some materials for learning how to solve problems like this

Unfortunately, solving algorithm problems, like most math problems, is a matter of reaching into your toolbox and using what you know. Very similiar problems may be solved in completely different ways, and there is no rule of thumb for knowing if a problem can be solved one way or the other, or even at all.

The best way to start, then, would be to build up your toolbox:

这篇关于我怎样才能学会如何解决这样的其他算法的问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆