关闭
当前搜索:

[置顶] 使用聚类算法来对用户进行兴趣小组推荐

接上一篇文章,这篇文章讲的是我如何实现聚类部分的代码。     聚类部分,老师的要求是:提出一个能够应用聚类算法的应用需求并实现该应用,包括从 MongoDB 数据库中整理数据集;在数据集上应用聚类算法;对聚类结果进行展示。     由此可见,主题可以任选,开放形式。由于之前我组员做的graphx已经实现了对小组推荐友情小组,因此,轮到我做聚类...
阅读(32) 评论(0)

[置顶] 使用Spark Streaming进行豆瓣用户画像分析

研一上学期,云计算课程,老师希望我们能掌握基于 Spark、HDFS 和 MongoDB 的本地高效分布式数据处理和存储环境的搭建和技术使用。我们小组选的课题是豆瓣小组和用户数据。其中,我作为组长,负责编写 Spark Streaming 部分和聚类部分的代码。 时间很紧凑,一周内就要自学之前完全不熟悉的大数据处理领域,并且完成案例实现,这对于我来说是个不小的挑战。于是那一周我早起晚睡,日常窝在...
阅读(26) 评论(0)

[置顶] 第一个个人J2EE网站——甜品屋

终于写到最近做的项目啦。甜品屋网站是我们的J2EE大作业,按学号检查演示,由于本人学号太靠前了,首当其冲(没错,就是这个成语)地被安排到开学第三周的周一早上的第一节课检查。而这个大作业是老师寒假刚开始放之前才布置的,所以,有多赶。。我春节后才开始做这个作业,到了3月7号就要检查?所以也就不到1个月的时间,更何况2月只有29天…… 然而,I manage it.一个月前我还对Bootstrap框架...
阅读(921) 评论(3)

[置顶] 自己创建一个Rest API

2015.10 大三上 面向web的计算课程 在大三上的课程中,海涛老师要求项目中运用rest进行数据采集。我两眼懵逼,啥是rest呀?然后就去网上找了学习资料。然后之后就着手开始自己写一个rest api。为什么要自己写呢?因为我没用框架,第一次使用php做网站,我想先打好基础再考虑高层次的东西,就没有用框架。其他人用的诸如laravel之类的PHP框架自己本身会带rest机制。对于我一个没用...
阅读(533) 评论(0)

Weekly Contest 72 leetcode 786. K-th Smallest Prime Fraction

A sorted list A contains 1, plus some number of primes.  Then, for every p < q in the list, we consider the fraction p/q. What is the K-th smallest fraction considered?  Return your answer as an ...
阅读(10) 评论(0)

Weekly Contest 72 leetcode 787. Cheapest Flights Within K Stops

There are n cities connected by m flights. Each fight starts from city u and arrives at v with a price w. Now given all the cities and fights, together with starting city src and the destinatio...
阅读(10) 评论(0)

Weekly Contest 72 leetcode 785. Is Graph Bipartite?

Given a graph, return true if and only if it is bipartite. Recall that a graph is bipartite if we can split it's set of nodes into two independent subsets A and B such that every edge in the grap...
阅读(7) 评论(0)

Weekly Contest 72 leetcode 784. Letter Case Permutation

Given a string S, we can transform every letter individually to be lowercase or uppercase to create another string.  Return a list of all possible strings we could create. Examples: Input: S = "a1b2"...
阅读(15) 评论(0)

Weekly Contest 71 leetcode 782. Transform to Chessboard

An N x N board contains only 0s and 1s. In each move, you can swap any 2 rows with each other, or any 2 columns with each other. What is the minimum number of moves to transform the board into...
阅读(34) 评论(0)

Weekly Contest 71 leetcode 780. Reaching Points

A move consists of taking a point (x, y) and transforming it to either (x, x+y) or (x+y, y). Given a starting point (sx, sy) and a target point (tx, ty), return True if and only if a sequence o...
阅读(31) 评论(0)

Weekly Contest 71 leetcode 781. Rabbits in Forest

In a forest, each rabbit has some color. Some subset of rabbits (possibly all of them) tell you how many other rabbits have the same color as them(告诉你 有多少只其他兔子跟它颜色一样). Those answers are placed in an...
阅读(39) 评论(0)

Weekly Contest 71 leetcode 783. Minimum Distance Between BST Nodes

Given a Binary Search Tree (BST) with the root node root, return the minimum difference between the values of any two different nodes in the tree. Example : Input: root = [4,2,6,1,3,null,null] O...
阅读(26) 评论(0)

leetcode 54. Spiral Matrix

Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example, Given the following matrix: [ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ] You...
阅读(12) 评论(0)

Weekly Contest 70 leetcode 778. Swim in Rising Water

On an N x N grid, each square grid[i][j] represents the elevation(高度) at that point (i,j).Now rain starts to fall. At time t, the depth of the water everywhere is t. You can swim from a square to anot......
阅读(54) 评论(0)

Weekly Contest 70 leetcode 777. Swap Adjacent in LR String

In a string composed of 'L', 'R', and 'X' characters, like "RXXLRXRXL", a move consists of either replacing one occurrence of "XL" with "LX", or replacing one occurrence of "RX" with "XR". Giv...
阅读(49) 评论(0)

Weekly Contest 70 leetcode 779. K-th Symbol in Grammar

On the first row, we write a 0. Now in every subsequent row, we look at the previous row and replace each occurrence of 0 with 01, and each occurrence of 1 with 10. Given row N and index K, r...
阅读(135) 评论(0)

算法-求二进制数中1的个数

问题描述 任意给定一个32位无符号整数n,求n的二进制表示中1的个数,比如n = 5(0101)时,返回2,n = 15(1111)时,返回4 这也是一道比较经典的题目了,相信不少人面试的时候可能遇到过这道题吧,下面介绍了几种方法来实现这道题,相信很多人可能见过下面的算法,但我相信很少有人见到本文中所有的算法。如果您上头上有更好的算法,或者本文没有提到的算法,请不要吝惜您的代码,分享的时候...
阅读(24) 评论(0)
410条 共28页1 2 3 4 5 ... 下一页 尾页
    个人资料
    • 访问:279072次
    • 积分:5856
    • 等级:
    • 排名:第5225名
    • 原创:338篇
    • 转载:71篇
    • 译文:1篇
    • 评论:37条
    博客专栏
    leetcode

    文章:234篇

    阅读:44298
    文章分类