{"size": 958, "ext": "js", "max_stars_repo_path": "src/main.js", "max_stars_repo_name": "methe-1/js-data-structure", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/main.js", "max_issues_repo_name": "methe-1/js-data-structure", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/main.js", "max_forks_repo_name": "methe-1/js-data-structure", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.1764705882, "max_line_length": 77, "alphanum_fraction": 0.5594989562}
import LinkedList, { Node } from "./LinkedList";
import promptBuilder from 'prompt-sync';
import Stack from "./stack";

function main(){

    let prompt = promptBuilder();

    console.log(" Linked List ---------------------------------");
    let list = new LinkedList(new Node(prompt('provide your data: ') , null))
    list.insertToHead(9);
    list.insertToHead(10);
    list.insertToHead(11);

    console.log("---------------------------------");

    console.log(`look for the 4th element, ${list.search(3).val}`);
    console.log(`delete the 4th element, ${list.delete(3)}`);
    console.log(`look for the 4th element, ${list.search(3).val}`);


    console.log("Stacks ---------------------------------");

    let stack = new Stack(new Node(prompt('provide your data: ')))
    console.log(stack.push(180));
    console.log(stack.peek());
    console.log(stack.pop());

    // console.log('--------');
    // stack.display()
    return 0; 
}

main()