Skip to content

ywh233/Coding-Problems

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Coding Problems

Some coding problems in Java.

Problems

Array

  • Compress Letters
  • Shrink Space

Binary Tree

  • Maximum Path Sum (?)
  • Longest Increasing Path

Divide and Conquer

  • Quick Sort (No duplicates)
  • Merge Sort

Dynamic Programming

  • Longest Palindrome (+)

Hash Map

  • Valid Anagram (+)

Linked List

  • Linked List Palindrome (+)
  • Reverse Linked List (+)

Trie

  • Search Word in 2D array (+)

+: Done; passed tests
?: Done, correctness unknown

Models

  • Binary Tree Node
  • Linked List Node
  • A-Z Trie Node (Use array of 26. Supports character a-zA-Z)
  • Map Trie Node (Use hash map. Generics)
  • Array Interval Map (1,3,5,7; 1=>1, 2=>1, 3=>3, 4=>3, 7=>7, 8=>7, 9=>7)

Utilities

Binary Tree

  • In-order/Pre-order traversal
  • Create tree from list (leetcode's rep. Layer by layer.)

Linked List

  • Java list to LinkedListNode
  • Linked list to string (1->2->3->(NULL))
  • Lists equality
  • Count nodes
  • Seek to position

Trie

  • Seek child by prefix (List or String)
  • Add contents (List or String)
  • Build A-Z trie from collection of Strings

About

Some coding problems in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages