GithubHelp home page GithubHelp logo

maxwellboss / assignmentexample Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dimoobraznii1986/assignments

0.0 0.0 0.0 1.23 MB

License: GNU General Public License v2.0

Python 90.15% Makefile 9.85%

assignmentexample's Introduction

Assignment

Part 1 Software Version Analytics

Please review this detail documnet Data Platform Considerations

Part 2 Clockwise Matrics

Repo Structure

Test Multiple Python Versions

The solution has:

  • function clockwiseMatrix
  • CI pipeline
    • linting
    • testing
    • formating

Task

Write a function that, given a matrix of integers, builds a string with the entries of that matrix appended in clockwise order.

Feel free to use any language you would like, but here is an example function signature def clockwiseMatrix(input):

input = [[2, 3, 4, 8],
	[5, 7, 9, 12],
	[1, 0, 6, 10]]

clockwiseMatrix(input)
>>2, 3, 4, 8, 12, 10, 6, 0, 1, 5, 7, 9

input = [[1, 2],
	[3, 4]]

clockwiseMatrix(input)
>>1,2,4,3

How can you verify that your solution is correct?

Solution

Let’s look the first example:

[[2, 3, 4, 8],
[5, 7, 9, 12],
[1, 0, 6, 10]]

I’ve assigned coordinates for each element, my goal is to go through the elements clockwise and print the elements in the order:

Untitled

The matrix has the following attributes:

  • w - width of matrix (number of columns)
  • h - height of matrix (number of rows)
  • x,y - coordinates of each element, such as 0,0;0,1;0,2 and so on.

The function codes:

assignmentexample's People

Contributors

dimoobraznii1986 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.