• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
neverlandly
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  Lintcode

1 2 3 4 下一页
Lintcode: Nuts & Bolts Problem

摘要:Quick Sort Way: We can use quick sort technique to solve this. We represent nuts and bolts in character array for understanding the logic. Nuts repres 阅读全文
posted @ 2017-03-17 06:12 neverlandly 阅读(745) 评论(0) 推荐(0)
Lintcode: Knight Shortest Path

摘要:BFS solution: 阅读全文
posted @ 2017-03-14 03:31 neverlandly 阅读(1437) 评论(0) 推荐(0)
Lintcode: Subtree

摘要:You have two every large binary trees: T1, with millions of nodes, and T2, with hundreds of nodes. Create an algorithm to decide if T2 is a subtree of 阅读全文
posted @ 2016-02-08 23:45 neverlandly 阅读(422) 评论(0) 推荐(0)
Lintcode: Expression Evaluation (Basic Calculator III)

摘要:Given an expression string array, return the final result of this expression Have you met this question in a real interview? Yes Example For the expre 阅读全文
posted @ 2016-02-02 13:16 neverlandly 阅读(1194) 评论(0) 推荐(0)
Lintcode: Count of Smaller Number

摘要:Give you an integer array (index from 0 to n-1, where n is the size of this array, value from 0 to 10000) and an query list. For each query, give you 阅读全文
posted @ 2016-02-02 07:22 neverlandly 阅读(676) 评论(0) 推荐(0)
Lintcode: Interval Sum II

摘要:Given an integer array in the construct method, implement two methods query(start, end) and modify(index, value): For query(start, end), return the su 阅读全文
posted @ 2016-02-02 05:24 neverlandly 阅读(479) 评论(0) 推荐(0)
Lintcode: Interval Sum

摘要:Given an integer array (index from 0 to n-1, where n is the size of this array), and an query list. Each query has two integers [start, end]. For each 阅读全文
posted @ 2016-02-02 04:46 neverlandly 阅读(1000) 评论(0) 推荐(0)
Lintcode: Interval Minimum Number

摘要:Given an integer array (index from 0 to n-1, where n is the size of this array), and an query list. Each query has two integers [start, end]. For each 阅读全文
posted @ 2016-02-01 12:30 neverlandly 阅读(698) 评论(0) 推荐(0)
Lintcode: Segment Tree Query II

摘要:For an array, we can build a SegmentTree for it, each node stores an extra attribute count to denote the number of elements in the the array which val 阅读全文
posted @ 2016-02-01 11:46 neverlandly 阅读(595) 评论(0) 推荐(0)
Lintcode: Segment Tree Modify

摘要:For a Maximum Segment Tree, which each node has an extra value max to store the maximum value in this node's interval. Implement a modify function wit 阅读全文
posted @ 2016-02-01 08:05 neverlandly 阅读(306) 评论(0) 推荐(0)
Lintcode: Segment Tree Query

摘要:For an integer array (index from 0 to n-1, where n is the size of this array), in the corresponding SegmentTree, each node stores an extra attribute m 阅读全文
posted @ 2016-02-01 07:52 neverlandly 阅读(810) 评论(0) 推荐(0)
Lintcode: Segment Tree Build

摘要:The structure of Segment Tree is a binary tree which each node has two attributes start and end denote an segment / interval. start and end are both i 阅读全文
posted @ 2016-02-01 06:41 neverlandly 阅读(302) 评论(0) 推荐(0)
Lintcode: Matrix Zigzag Traversal

摘要:Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in ZigZag-order. Have you met this question in a real intervie 阅读全文
posted @ 2016-02-01 05:24 neverlandly 阅读(650) 评论(0) 推荐(0)
Lintcode: Kth Smallest Number in Sorted Matrix

摘要:Find the kth smallest number in at row and column sorted matrix.ExampleGiven k =4and a matrix:[ [1 ,5 ,7], [3 ,7 ,8], [4 ,8 ,9],]return5ChallengeKL... 阅读全文
posted @ 2016-01-17 12:23 neverlandly 阅读(295) 评论(0) 推荐(0)
Lintcode: Minimum Subarray

摘要:Given an array of integers, find the subarray with smallest sum.Return the sum of the subarray.Have you met this question in a real interview? YesExam... 阅读全文
posted @ 2016-01-09 06:09 neverlandly 阅读(261) 评论(0) 推荐(0)
Lintcode: Permutation Index II

摘要:Given a permutation which may contain repeated numbers, find its index in all the permutations of these numbers, which are ordered in lexicographical ... 阅读全文
posted @ 2016-01-06 09:11 neverlandly 阅读(1315) 评论(0) 推荐(0)
Lintcode: Permutation Index

摘要:Given a permutation which contains no repeated number, find its index in all the permutations of these numbers, which are ordered in lexicographical o... 阅读全文
posted @ 2016-01-06 07:56 neverlandly 阅读(2052) 评论(0) 推荐(0)
Lintcode: Wood Cut

摘要:Given n pieces of wood with length L[i] (integer array). Cut them into small pieces to guarantee you could have equal or more than k pieces with the s... 阅读全文
posted @ 2016-01-06 05:59 neverlandly 阅读(1014) 评论(0) 推荐(0)
Lintcode: Update Bits

摘要:Given two 32-bit numbers, N and M, and two bit positions, i and j. Write a method to set all bits between i and j in N equal to M (e g , M becomes a s... 阅读全文
posted @ 2016-01-06 05:20 neverlandly 阅读(566) 评论(0) 推荐(0)
Lintcode: Route Between Two Nodes in Graph

摘要:Given a directed graph, design an algorithm to find out whether there is a route between two nodes.Have you met this question in a real interview? Yes... 阅读全文
posted @ 2016-01-06 04:58 neverlandly 阅读(709) 评论(0) 推荐(0)

1 2 3 4 下一页
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3