Giter Club home page Giter Club logo

tetrahedron's Introduction

Tetrahedron

This challenge is designed to assess your problem-solving and programming skills. Please read the instructions carefully before you begin.

Instructions:

Your task is to write a program that processes these files to solve the given problem.
The results should be submitted in the specified format.

Problem Description:

You are to write a program that reads a list of points on a 3D plane from a file. Each point is defined by its coordinates and an associated number and is presented in the following format: (x, y, z, n), where x, y, and z are floats, and n is an integer ranging from 0 to 100

Your task:

Identify the indices of four points that form a 'valid' tetrahedron with the smallest possible volume.

A'valid' tetrahedron has to be formed with points such that the sum of their n values is equal to 100

Example:

Suppose you the following points:

(3.00, 4.00, 5.00, 22) (2.00, 3.00, 3.00, 3) (1.00, 2.00, 2.00, 4) (3.50, 4.50, 5.50, 14) (2.50, 3.50, 3.50, 24) (6.70, 32.20, 93.0, 5) (2.50, 3.00, 7.00, 40)

A tetrahedron formed by the points with indices 0, 3, 4, 6 is the only valid tetrahedron in this example; because 22 + 14 + 24 + 40 = 100

The output should list the zero-based indices of these four points in ascending order.

Results:

Your code should return a list of four points that form the smallest tetrahedron for each input file.

You should return the indexes in ascending order.
Make sure that the indexes start at 0.

tetrahedron's People

Contributors

aslansutu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.