上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 30 下一页
摘要: 例如在如下一段代码中: Matrix m = new Matrix(2,3); for(int i=0; i<m.getRowDimension(); i++) { for(int j=0; j<m.getColumnDimension(); j+... 阅读全文
posted @ 2015-09-22 15:19 江湖小妞 阅读(3177) 评论(0) 推荐(0)
摘要: Question:Sort a linked list inO(nlogn) time using constant space complexity.Analysis:问题描述:在O(nlogn)时间内用常数的空间复杂度,完成一个链表的排序。思考:排序时间复杂度为O(nlogn)的话,快排、堆排序... 阅读全文
posted @ 2015-09-21 22:18 江湖小妞 阅读(212) 评论(0) 推荐(0)
摘要: 1.如题。 最近写了一个FCM的聚类算法,希望能够可视化结果,因此一个想法是调用weka中的包,使自己的程序可以可视化。这里参考了网络上的方法,首先实现在Eclipse中调用weka包实现分类的功能。 步骤如下: 1. 到weka官网下载weka安装程序,并安装; 2.在weka安装目录:(我的是C 阅读全文
posted @ 2015-09-21 14:20 江湖小妞 阅读(1699) 评论(0) 推荐(0)
摘要: Question:Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the fa... 阅读全文
posted @ 2015-09-20 14:09 江湖小妞 阅读(133) 评论(0) 推荐(0)
摘要: Question:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on Wi... 阅读全文
posted @ 2015-09-20 10:47 江湖小妞 阅读(197) 评论(0) 推荐(0)
摘要: Question:Write a program to find then-th ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. For example,1, 2, 3, 4... 阅读全文
posted @ 2015-09-19 20:04 江湖小妞 阅读(243) 评论(0) 推荐(0)
摘要: Question:Write a program to check whether a given number is an ugly number.Ugly numbers are positive numbers whose prime factors only include2, 3, 5. ... 阅读全文
posted @ 2015-09-19 19:05 江湖小妞 阅读(136) 评论(0) 推荐(0)
摘要: Question:Given an arraynums, write a function to move all0's to the end of it while maintaining the relative order of the non-zero elements.For exampl... 阅读全文
posted @ 2015-09-19 18:33 江湖小妞 阅读(140) 评论(0) 推荐(0)
摘要: Question:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may c... 阅读全文
posted @ 2015-09-19 16:12 江湖小妞 阅读(171) 评论(0) 推荐(0)
摘要: Question:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may c... 阅读全文
posted @ 2015-09-19 14:01 江湖小妞 阅读(147) 评论(0) 推荐(0)
上一页 1 ··· 17 18 19 20 21 22 23 24 25 ··· 30 下一页