Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Zigzag Merge Iterator

This repository contains a Rust implementation of a zigzag merge iterator. The iterator merges two iterators in a zigzag fashion, alternating between elements from each iterator.

Features

  • Custom iterator implementation using Rust's Iterator trait.
  • Unit tests to validate functionality.

Usage

To use the zigzag iterator, include the following in your Rust project:

use your_crate_name::zigzag_merge;

let iter1 = vec![1, 3, 5].into_iter();
let iter2 = vec![2, 4, 6].into_iter();

let merged = zigzag_merge(iter1, iter2);
for value in merged {
    println!("{}", value);
}

Running Tests

To run the tests for this implementation, use the following command:

cargo test

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages