Suzy Zhang

Home Archives About
2017-10-22
Algorithm

LintCode/Word Search II

Problem Summary

Given a matrix of lower alphabets and a dictionary, find all words in the dictionary that can be found in the matrix. A word can start from any position in the matrix and go left/right/up/down to the adjacent position.

Read More

Share Comments
  • BFS
  • LintCode
  • Trie
2017-10-22
Algorithm

LintCode/Longest Consecutive Sequence

Problem Summary

Given an unsorted array of integers, A[1], A[2],…, A[N], find the length of the longest consecutive elements sequence.

Read More

Share Comments
  • Array
  • LintCode
2017-10-21
Algorithm

LintCode/Distinct Subsequences

Problem Summary

Given a string S and a string T, count the number of distinct subsequences of T in S.

Read More

Share Comments
  • DP
  • LintCode
2017-10-20
Algorithm

LintCode/Word Ladder II

Problem Summary

Given two words (start and end), and a dictionary,(All words have the same length), find all shortest transformation sequence(s) from start to end, such that:

  1. Only one letter can be changed at a time
  2. Each intermediate word must exist in the dictionary

Read More

Share Comments
  • BFS
  • LintCode
2017-10-16
Algorithm

LintCode/Topological Sorting

Problem Summary

Given an directed graph, find any topological order for it.

Read More

Share Comments
  • Graph Theory
  • LintCode
  • Topological Sorting
2017-10-15
Algorithm

Codeforces/873B. Balanced Substring

Problem Summary

Given a string S consisting only of characters 0 and 1. A substring starts from l to r is called balanced if the number of zeroes equals to the number of ones in this substring. Determine the length of the longest balanced substring of S.

Read More

Share Comments
  • Codeforces
  • DP
  • Implementation
2017-10-14
Algorithm

LintCode/Binary Tree Serialization

Problem Summary

Serialize and deserialize a binary tree, i.e., write the tree to a string and read the string to reconstruct the exact same binary tree.

Read More

Share Comments
  • Binary tree
  • LintCode
2017-10-14
Algorithm

LintCode/Validate Binary Search Tree

Problem Summary

Given a binary tree, determine if it is a binary search tree.

Read More

Share Comments
  • Binary Search Tree
  • LintCode
2017-10-13
Algorithm

LintCode/Remove Node In Binary Search Tree

Problem Summary

Given a root of Binary Search Tree with unique value for each node. Remove the node with given value V. If there is no such a node with given value in the binary search tree, do nothing. Remember to keep the tree a binary search tree after removal.

Read More

Share Comments
  • Binary Search Tree
  • LintCode
2017-10-13
Algorithm

LintCode/Reorder List

Problem Summary

Given a singly linked list L : L[0] -> L[1] -> … -> L[N-1] -> L[N].
Reorder it to : L[0] -> L[N] -> L[1] -> L[N-1] -> L[2] -> L[N-2] -> …

Read More

Share Comments
  • Linked List
  • LintCode
«Prev12345…9Next»

Categories

  • Algorithm85
  • Data Structure1

Tags

  • Array5
  • BFS3
  • Big Number1
  • Binary Search7
  • Binary Search Tree5
  • Binary tree1
  • Bit Manipulation3
  • Bucket Sort1
  • Codeforces1
  • Convex Hull1
  • Cycle Detection1
  • DFS4
  • DP23
  • DP on Trees1
  • Dijkstra1
  • Dinic1
  • Fast power1
  • Game Theory1
  • Geometry1
  • Graph Theory16
  • Greedy6
  • HackerRank18
  • Hash2
  • Heap1
  • Hungarian Alogrithm1
  • IDDFS2
  • Implementation2
  • LCA1
  • LeetCode12
  • Linked List3
  • LintCode31
  • MST1
  • Map Reduce1
  • Math1
  • Matrix1
  • Maximum Flow2
  • Merge Sort1
  • Minimum Cut2
  • Minimum length cycle1
  • Number Theory3
  • Partial order1
  • Prim1
  • Pruning2
  • SPFA1
  • Sort3
  • Stack1
  • String3
  • Strongly connected components1
  • Tarjan's algorithm1
  • Topological Sorting2
  • Tree2
  • Trie3
  • Two Pointers1
  • USACO25
  • Union-find1

Archives

  • April 20192
  • March 20192
  • November 201711
  • October 201724
  • September 201718
  • August 201719
  • July 201710

Recent Posts

  • LeetCode/Minimum Cost to Merge Stones
  • LeetCode/Lexicographical Numbers
  • LeetCode/Knight Dialer
  • LeetCode/Regions Cut by Slashes
  • LeetCode/Edit Distance
© 2020 Suzy Zhang
Powered by Hexo
Home Archives About