pofk_algorithm 0.0.40 copy "pofk_algorithm: ^0.0.40" to clipboard
pofk_algorithm: ^0.0.40 copied to clipboard

discontinuedreplaced by: lunaris_engine

A fast, extensible Dart library for algorithms and data structures, offering search, sort, and AI utilities. Over 500 algorithms planned in future versions.

Changelog #

0.0.40 - 2025-08-10 #

The total number of algorithms is 82.

Added #

Tree Algorithms (New)

  • binary_tree_node (generic tree node)
  • Tree traversals: inorderTraversal, preorderTraversal, postorderTraversal
  • level_order_traversal (BFS)
  • tree_depth (height calculation)
  • invert_tree (mirror tree)
  • lowest_common_ancestor (LCA)
  • validate_bst (BST validation)
  • tree_diameter (longest path)
  • balanced_tree_check (height-balanced check)
  • Tree serialization: serialize_tree / deserialize_tree
  • zigzag_traversal (alternating level order)

Linked List Algorithms (New)

  • linked_list_node (generic singly linked list node)
  • doubly_linked_list_node (generic doubly linked list node)
  • Insert/delete at specific positions
  • Reverse linked list (iterative, recursive, in groups, between positions)
  • Cycle detection (Floyd's algorithm)
  • Merge two sorted linked lists
  • Remove nth node from end
  • Palindrome check for linked list
  • Find intersection of two lists

Detailed Tree Module #

  • BinaryTreeNode — Generic binary tree node with left/right children
  • Tree Traversals: inorderTraversal<T>, preorderTraversal<T>, postorderTraversal<T>
  • Level Order Traversals: levelOrderTraversal<T>, zigzagTraversal<T>
  • Tree Properties: treeDepth<T>, treeDiameter<T>, isBalancedTree<T>
  • Tree Operations: invertTree<T>, lowestCommonAncestor<T>, validateBST<T extends Comparable>
  • Serialization: serializeTree<T>, deserializeTree<T>

Changed #

  • Exported all new tree algorithms from lib/pofk_algorithm.dart
  • Updated README.md with comprehensive tree algorithms section
  • Enhanced example/pofk_algorithm_example.dart with basic tree operations
  • Added detailed tree algorithm demos in example/tree_algorithms_example.dart

Added Tests & Docs #

  • Full test suite for tree algorithms in test/tree_algorithms/
  • Detailed documentation including time/space complexity
  • Generic type support (<T>) for all algorithms, BST validation constrained to T extends Comparable

0.0.30 - 2025-08-09 #

Added #

Graph Algorithms

  • BFS, DFS, Topological Sort
  • Connected Components, Cycle Detection (directed/undirected)
  • Bipartite Graph Check
  • Shortest Path (unweighted BFS)
  • Weighted Edge utility
  • Dijkstra, Bellman-Ford, Floyd-Warshall
  • MST: Kruskal, Prim
  • Kosaraju SCC, Articulation Points
  • Union-Find (alias of DisjointSet)

Changed #

  • Improved example/pofk_algorithm_example.dart with structured examples across all modules.

Fixed #

  • Resolved compile issues in graph algorithms (generic consts, reverse usage)
  • Corrected test expectations in min_sum

0.0.2 - 2025-07-24 #

Initial Release #

List Algorithms

  • Linear Search, Binary Search, Merge Sort, Bubble Sort, Insertion Sort, Selection Sort, Quick Sort, Counting Sort
  • Reverse List, Find Max/Min, Find Duplicates
  • Kadane's Algorithm, Max Sum Subarray of Size K, Min Sum, Average Subarray
  • Two Sum (sorted), Remove Duplicates, Rotate Array Right, Prefix Sum

Set Algorithms

  • Has Duplicates, Disjoint Set, Find Intersection, Set Difference, Frequency Uniqueness, Has Two Sum, Has Unique Window

Map Algorithms

  • Frequency Count, Group By Key, First Non-Repeated Element, Anagram Checker, Two Sum, LRU Cache, Most Frequent Element, Top K Frequent, Length of Longest Substring

String Algorithms

  • Reverse String, Palindrome Checker, Anagram Checker, Longest Palindromic Substring, String Compression
  • Brute Force Search, KMP Search, Rabin-Karp Search
  • Longest Common Prefix, Edit Distance, Count Vowels and Consonants
3
likes
0
points
68
downloads

Publisher

unverified uploader

Weekly Downloads

A fast, extensible Dart library for algorithms and data structures, offering search, sort, and AI utilities. Over 500 algorithms planned in future versions.

Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on pofk_algorithm