Giter Club home page Giter Club logo

coding-problem-artefacts's Introduction

Coding Problem Artefacts

This is a repository which includes the instructions and artefacts required for solving the Backend Geektrust coding problems. Please only submit source files while submitting the solution.

This document covers following aspects of code evaluation.

  • Correctness
  • Unit tests
  • Build

Languages we support

If you are solving the coding problem in any one of the languages given below, then follow the instructions from their respective ReadMe files by clicking on the link

Correctness

We expect your program to take the location to the text file as parameter. Input needs to be read from a text file, and output should be printed to the console. The text file will contain only commands in the format prescribed by the respective problem.

Please see the read me files of the language you have choosen for more details.

Unit tests

Unit tests are written to ensure that your public methods are working correctly. We recommend you to write unit tests. Please see the read me files of the language you have choosen for more details.

You can also submit your solution without unit tests.

Build

Build files help in automating the execution and testing for the solution. When you are writing your solution in a programming language that supports build & dependency management, we want you to add a build file to your solution, so that we can build, execute and test it.

You are also free to write code without any build file too, but that will affect your evaluation.

Support for other languages

Apart from these we also support Clojure, Erlang, Groovy, Kotlin, PHP & Scala for our coding problems. However these do not have automated code correctness checks. If you language of choice is one of these, please make sure:

  • Your application is a command line application.
  • Your main file to execute is named as geektrust.<file ext>
  • It takes in a command line argument which is the location of the text file containing the commands that needs to be executed by your program.
  • After processing, it should print only the output related to each command in the file.

For e.g, if you re solving in PHP, and your input file is /tmp/input1.txt then the command for executing your code should be:

php geektrust.php /tmp/input1.txt

For e.g , in case of family problem, if the input file passed in has these commands

ADD_CHILD Chitra Aria Female 
GET_RELATIONSHIP Lavnya Maternal-Aunt 
GET_RELATIONSHIP Aria Siblings

then your solution should print.

CHILD_ADDITION_SUCCEEDED 
Aria 
Jnki Ahit

coding-problem-artefacts's People

Contributors

ashishkujoy avatar clairsebastian avatar dhanush avatar dragonbuilder avatar giriraj-pottekkad avatar krishnannair avatar lukasimha2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

coding-problem-artefacts's Issues

Build Failure due to : unknown property 'archiveBaseVersion' for task ':jar'

archiveBaseVersion = null //Please do not change this final artifact version

getting following error for the boilerplate code for Gradle version
Could not set unknown property 'archiveBaseVersion' for task ':jar' of type org.gradle.api.tasks.bundling.Jar.

Full stack

* Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating root project 'MeetTheFamily'.
Caused by: groovy.lang.MissingPropertyException: Could not set unknown property 'archiveBaseVersion' for task ':jar' of type org.gradle.api.tasks.bundling.Jar.
	at org.gradle.internal.metaobject.AbstractDynamicObject.setMissingProperty(AbstractDynamicObject.java:117)
	at org.gradle.internal.metaobject.ConfigureDelegate.setProperty(ConfigureDelegate.java:104)

Gradle version

Gradle 6.4.1
------------------------------------------------------------

Build time:   2020-05-15 19:43:40 UTC
Revision:     1a04183c502614b5c80e33d603074e0b4a2777c5

Kotlin:       1.3.71
Groovy:       2.5.10
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          1.8.0_251 (Oracle Corporation 25.251-b08)
OS:           Windows 10 10.0 amd64

Tame of Thrones test file input and output is not matching

The file content of input_2.txt is

AIR OWLAOWLBOWLC
LAND OFBBMUFDICCSO
ICE VTBTBHTBBBOBAB
WATER SUMMER IS COMING

and the content of output_2.txt is

NONE

but the content of the file is supposed to be

SPACE LAND ICE

since the strings

OFBBMUFDICCSO (2 F's, 1 S, 1 I, 1 U) and VTBTBHTBBBOBAB (3 T's, 1 H, 1 V, 1 A, 1 O) is correct encoding of LAND and ICE respectively.

Ride-Sharing-Problem-Testcases-Doesn't-Match-Problem-Statement

I was solving ride sharing problem but the testcases doesn't match with the problem statement

Screenshot 2023-11-11 142210

here the problem statement says that the order should be ascending . but in sample input 2 the first line in output should should be D1 D2 D3 as their distances from the rider1 (R1) is √5 √5 √8 respectively. but in the output its D2 D3 D1 which is not correct

Screenshot 2023-11-11 142226

No unit test found!

Doing ride share problem and also have added tests, but on submission i am getting test failure due to no test found. I am not sure where I am doing wrong.

anybody who can help?
I have following dir structure.
image

Plugin 'org.apache.maven.plugins:maven-assembly-plugin:' not found

Hello, I have done Family Tree Problem but there is some issue with pom.xml file.
I am getting this error in my pom.xml file, " Plugin 'org.apache.maven.plugins:maven-assembly-plugin:' not found" . I am using IntelliJ Idea and I have tried invalidating the cache and also turned on plugin registry but still it is not working. Any suggestions

`

4.0.0

<groupId>org.example</groupId>
<artifactId>geektrust</artifactId>
<version>1.0-SNAPSHOT</version>

<properties>
    <maven.compiler.source>15</maven.compiler.source>
    <maven.compiler.target>15</maven.compiler.target>
</properties>
<dependencies>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.20</version>
        <scope>provided</scope>
    </dependency>
</dependencies>
<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <configuration>
                <finalName>geektrust</finalName> <!-- Please do not change this final artifact name-->
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <appendAssemblyId>false</appendAssemblyId>
                <archive>
                    <manifest>
                        <addClasspath>true</addClasspath>
                        <!-- This is the main class of your program which will be executed-->
                        <mainClass>org.example.GeekTrustFamilyProblem</mainClass>
                    </manifest>
                </archive>
            </configuration>

            <executions>
                <execution>
                    <id>make-assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <!-- Code coverage plugin. Use only if you are adding unit tests. Do not change any of the values in the entries below -->
    </plugins>
</build>

`

Build Script For c#

To earn build badge, we would need a build script but i did not find anything specific to build script in this repository other than building the solution and running it. If you can provide a sample build script then that would be very helpful.

I tried giving the dotnet build and dotnet run command in my solution but couldn't earn the build badge.

Can't upload spring application

I've used Spring boot to solve MyMoney problem and when I use maven-assembly plugin to build the application. It doesn't find the main class. But when I use springboot-maven-plugin to build my application, It just runs perfectly fine.

Could anyone help me?

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.