Skip to content

sivajiganesh-dev/open-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

open-test

This repo has two tests

  1. Sort
    • Sorting the input data based on the no of occurrences
  2. Tree
    • Finding the least/min time to burn the tree

Details

Two programs are simple java 8 based console applications, which supports custom data, and hard-coded input modes. Default mode is hard-coded, to enable custom input provide single argument with value 1

Compiling & Execution

Sort

$ cd sort/
$ javac SortByOccurrences.java
$ java SortByOccurrences [1]

[1] is optional and if provided program asks for user input. Input should be in the format of

x,y,z,...

Example: ref below image

Image of sort execution

Tree

$ cd tree/
$ javac BinaryTreeTraversal.java 
$ java BinaryTreeTraversal [1]

[1] is optional and if provided program asks for user input. Input should be in the format of

N
N-1 entries of [parent, child] one per each line
L leaf node

Example: ref the image

Image of tree execution

About

Code for sorting and tree traversal test questions

Topics

Resources

Stars

Watchers

Forks

Languages