The place to come for pair programming practice problems in your language, designed for new and old developers alike.

Related tags

CodingDojo
Overview

Coding Dojo

About

The Coding Dojo is a project and weekly meetup hosted by Code Connector to offer opportunities for learning, mentoring, and practicing coding and problem-solving. Each week, one of our new developers will "drive" a coding challenge with support and guidance from one of our more experienced members.

We are committed to upholding the Code Connector Code of Conduct, so please review before hopping on. This will be a safe and supportive environment focused on growth and learning, and moderated by active community members.

Roles

During each meetup, we will have folks fulfilling the following roles:

  • Host: An active community member. This is the person who will welcome guests, introduce the challenge, and moderate discussion during the meetup.
  • Driver: The primary learner. This is the person who'll be typing code, with input from the Navigator and the Mob.
  • Navigator: An experienced developer. This is the person who'll be guiding the Driver towards the solution, offering advice and support.
  • Mob: Everyone else. This group is focused on learning from the Navigator and the Driver, while offering suggestions and support of their own.

Coding Challenges?

Coding challenges are an important part of growth as a developer. We would like to use them as a way to foster growth in both coding ability and software engineering methodologies. Challenges will be added as directories in the root of this project and we will have mobbing sessions as a group for anyone able to join. There will be an effort to work in as many different languages as there is interest in learning.

Issues
  • Directory structure

    Directory structure

    We need to decide on a directory structure. There is a proposal by @drkennetz that we separate challenges from solutions

    from Slack

    Format could be:

    ./CodingDojo/questions/
        ./03-26-2021/question.MD
        ./04-02-2021/question.MD./CodingDojo/answers/
        ./03-26-2021/answer.py, answer.js, answer.java, answer.rb
    ./CodingDojo/answers/
        ./03-26-2021/answer.py, answer.js, answer.java, answer.rb
    

    (edited to properly display format)

    help wanted question 
    opened by xanderyzwich 10
  • Setup challenge 2021 04 06

    Setup challenge 2021 04 06

    Please take a look and (a) make sure you can run the tests and (b) please review for stupid Java mistakes.

    opened by ericwburden 6
  • [Challenge] Sum Arrays

    [Challenge] Sum Arrays

    Sum Arrays

    Given an array of values, return the sum of the values.

    Business Rules/Errata

    • Input must be an array.
    • The array may be nested more than one level.
    • All values must be integers.
    • Solutions shall not use built in methods to flatten the array to one-dimension.

    Examples

    One dimension:

    sum_of_array([1,2,3,4,5]) => 15
    

    Two dimensions:

    sum_of_array([1,2,[1,2,3],4,5]) => 18
    

    n dimensions:

    sum_of_array([1,[1,2,[3,4],5],[6,7]]) => 29
    
    proposed challenge 
    opened by parhaml 4
  • Weekly Flow

    Weekly Flow

    Discussion has been going around as to how we handle the flow of week to week tasks in preparation for the next mob session.

    Challenges

    Challenges will be submitted as issues. Voting on these (👍) should be restricted to one vote per person each week.

    Challenge will be posted on Friday (Monday may be tried as well) for the following week.

    Solutions

    • No solutions will be accepted in PR before the mob/meetup.
    • The mob solution will be titled mob.[lang] in the solutions directory for that challenge.
    • Solutions may be submitted by anyone after that solution is merged. Any and all solutions of this type will be named with the person's github username and the lang. My solutions will be submitted as xanderyzwich.py if they are in Python. These solutions will be submitted through Pull Request (PR) from the persons fork of the repository. Code reviewers can/will assist with forming the solution such that it can be understood by others and be displayed for learning purposes.
    opened by xanderyzwich 4
  • Merge pull request #1 from codeconnector/main

    Merge pull request #1 from codeconnector/main

    Use variable over tmpfile for test results (#19)

    opened by mic-k-r 4
  • 2021 04 13 submit challenge

    2021 04 13 submit challenge

    Adds the project shell for the 2021-04-13 challenge, Single and Ready to Mingle. Project shell is for a JavaScript project using npm 6+.

    opened by ericwburden 4
  • 2020-04-20 Challenge Solution

    2020-04-20 Challenge Solution

    Change-Id: I9fda0d239cce0579b88356e8ff3d1b6995c02b38

    opened by Aaronlonin 3
  • 2021 04 13 submit challenge

    2021 04 13 submit challenge

    Hoping that ive done this right this time

    opened by ZacWilson87 3
  • python solution with unittests

    python solution with unittests

    python solution with unittests

    opened by drkennetz 3
  • my palindrome solution in go

    my palindrome solution in go

    can be run in this directory by running go test. I've only handled the types of int and string in my type conversions (but I had a fun time writing a type converter). I also got my hands a little dirty with writing test tables!

    opened by drkennetz 3
  • [Challenge] Find Three Largest Numbers

    [Challenge] Find Three Largest Numbers

    Find Three Largest Numbers

    Write a function that takes in an array of at least three integers and, without sorting the input array, returns a sorted array of the three largest integers in the input array. The function should return duplicate integers if necessary.

    Business Rules/Errata

    • The input array should have at least three integers. If it does not, you should return a null value.
    • You may not sort the input array
    • The function should handle duplicate integers; for example [10, 5, 9, 10, 12] should return [10, 10, 12]
    • Constant space -> you will return a new array of 3 integers, and this will be the only new data structure you create.
    • Linear time -> you should solve this problem by only passing through the array a single time.

    Examples

    This section should provide examples of expected inputs/outputs like so:

    findThreeLargestNumbers([141, 1, 17, -7, -17, -27, 18, 541, 8, 7, 7]) -> [18, 141, 541]
    findThreeLargestNumbers([11, -7, 5]) -> [-7, 5, 11]
    findThreeLargestNumbers([1]) -> Null
    
    proposed challenge 
    opened by drkennetz 2
  • [Challenge] Use a debugger

    [Challenge] Use a debugger

    Use a debugger

    the Challenge setup will require some nearly complete broken bits of code

    Business Rules/Errata

    • Language agnostic (although the setup will require knowledge beforehand)

    Examples

    Can reuse a previous challenge that is sufficiently complex to have multiple functions that may need troubleshooting.

    proposed challenge 
    opened by xanderyzwich 1
  • [Challenge] Limited Levenshtein Leap

    [Challenge] Limited Levenshtein Leap

    Limited Levenshtein Leap

    Given a start word, and end word, and a "dictionary" of valid words, find the shortest transformation sequence from start to end such that only one letter is changed at each step of the sequence, and each transformed word exists in the dictionary. If there is no possible transformation, return NULL.

    Business Rules/Errata

    • The "dictionary" is simply an unordered array of strings.
    • The start, stop, and "dictionary" words will all be the same length and all lowercase.
    • Your function should return the sequence of words that represent the transformations from start to end.

    Examples

    Example 1

    start = "dog"
    end = "cat"
    dictionary = ["dot", "dop", "dat", "cat"]
    findTransformSequence(start, end, dictionary)  // ["dog", "dot", "dat", "cat"]
    

    Example 2

    start = "dog"
    end = "cat"
    dictionary = ["dot", "tod", "dat", "dar"]
    findTransformSequence(start, end, dictionary)  // NULL
    
    proposed challenge 
    opened by ericwburden 2
  • [Challenge] Coin Counter

    [Challenge] Coin Counter

    Coin Counter

    You are given n fair coins, and you flip all at the same time. Every time a coin comes up 'tails', it is removed from play. The ones that come up 'heads', you will flip again on the next round. Write a function that, given n, returns the number of rounds you'd expect to play until only one coin remains.

    Business Rules/Errata

    • Each coin is fair, meaning it is equally likely to come up as either side on any given round.
    • Your answer should be rounded to the nearest whole number, since it is impossible to play part of a round.
    • Extra Challenge: What is the most time-efficient solution you can devise?
    • Extra Challenge: Can you implement this game for dice, instead of coins?

    Examples

    count_coin_rounds(2)        // 1
    count_coin_rounds(100)    // 7
    count_coin_rounds(1000)  // 10
    
    proposed challenge 
    opened by ericwburden 3
  • [Challenge] Dictionary Decompression

    [Challenge] Dictionary Decompression

    Dictionary Decompression

    Given a nested dictionary, flatten the dictionary such that the keys of the final result are namespaced with a period between the original keys leading to the value.

    Business Rules/Errata

    • Data Structure Required: Dictionary/Map/HashMap This challenge requires a language that supports a version of a Dictionary.
    • Your function should be able to flatten dictionaries nested arbitrarily deeply.
    • You can assume that none of the dictionary keys contain a period.
    • The type of the dictionary values is not important to this exercise. Assume they will always be unsigned integers.

    Example

    nested_dict = {
      "key": 3,
      "foo": {
        "a": 5,
        "bar": {
          "baz": 8
        }
      }
    }
    
    result = flattenDictionary(nested_dict)
    print(result)
    
    {
      "key": 3,
      "foo.a": 5,
      "foo.bar.baz": 8
    }
    
    proposed challenge 
    opened by ericwburden 1
  • [Challenge] Non-Constructible Change

    [Challenge] Non-Constructible Change

    Non-Constructible Change

    Given an array of sorted positive integers representing the values of coins in your possession, write a function that returns the minimum amount of change (the minimum sum of money) that you cannot create.

    Business Rules/Errata

    • You can assume that the input will be a list or array of sorted integers.
    • The given coins can have any positive integer value, they do not have to correspond to real coin values (for example, we could have a coin worth 3).
    • The coins aren't necessarily unique (you could have 7 coins worth 1, 2 coins worth 3, etc.
    • Extra challenge: Complete this challenge in linear time and constant space.

    Examples

    coins = [1]
    nonConstructibleChange(coins) // 2
    
    coins = [1, 1, 1, 1, 1]
    nonConstructibleChange(coins) // 6 
    
    coins = [1, 1, 2, 3, 5, 7, 22]
    nonConstructibleChange(coins) // 20
    
    coins = [1, 1, 4, 5, 6, 8, 9]
    nonConstructibleChange(coins) // 3
    
    coins = [1, 1, 1, 1, 5, 10, 15, 20, 100]
    nonConstructibleChange(coins) // 55
    
    proposed challenge 
    opened by drkennetz 1
  • [Challenge] Simple 2D Iterator

    [Challenge] Simple 2D Iterator

    Simple 2D Iterator

    Implement a class (or struct, or object) representing a 2-dimensional iterator. This class should be initialized with a 2-dimensional (nested) array, and should implement two methods:

    • next() returns the next element in the array of arrays
    • has_next() returns true/false indicating whether the iterator still has elements left

    Business Rules/Errata

    • Data Structure Required: 2D Array
    • Your class will need a constructor method (or other strategy) to accept a 2-dimensional array and produce an instance of your class.
    • You should not flatten or otherwise copy data out of the 2D array into another data structure.
    • If you call next() on your class, and there are no elements left to return, return null (or some other indicator that the iterator has been exhausted).

    Examples

    Example 1

    instance = new NestedIterator([[1, 2], [3], [], [4, 5, 6]]);
    instance.next()  // 1
    instance.next()  // 2
    instance.next()  // 3
    instance.has_next()  // true
    instance.next()  // 4
    instance.next()  // 5
    instance.next()  // 6
    instance.has_next()  // false
    instance.next()  // NULL
    

    Example 2

    instance = new NestedIterator([[9], [1, 7, 5], [2, 9], []]);
    instance.next()  // 9
    instance.next()  // 1
    instance.next()  // 7
    instance.has_next()  // true
    instance.next()  // 5
    instance.next()  // 6
    instance.next()  // 9
    instance.has_next()  // false
    instance.next()  // NULL
    
    proposed challenge 
    opened by ericwburden 4
  • [Challenge] Sum of Squares

    [Challenge] Sum of Squares

    Sum of Squares

    Given a positive integer n, find the smallest number of squared integers which sum to n (i.e. n = x² + y² should yield 2).

    Business Rules/Errata

    • Any attempt to provide non-integer, non-positive input should return an error.
    • Return only the count of squared integers that sum to n, not the list of integers.
    • Remember that 1² = 1.

    Examples

    count_squared_addends(13);  // 2
    count_squared_addends(27);  // 3
    
    • For n = 13: 3² + 2² = 9 + 4 = 13
    • For n = 27:
      • 3² + 3² + 3² = 9 + 9 + 9 = 27
      • 5² + 1² + 1² = 25 + 1 + 1 = 27
    proposed challenge 
    opened by ericwburden 0
  • [Challenge] Square Maze

    [Challenge] Square Maze

    Square Maze

    Given a square (NxN) matrix of '0's and '1's, determine how many ways the matrix can be traversed from the top left element to the bottom right element.

    Business Rules/Errata

    • Data Structure Required: 2D Matrix
    • Assume the matrix represents a 2-dimensional map.
    • You may only move up, down, left, and right in the matrix, not diagonally.
    • You may only traverse matrix elements that are '0' (representing an empty space). A '1' represents an impassible barrier.
    • The top left and bottom right corner will always be '0'.
    • If there is no path from the top left to the bottom right, return 0. Otherwise, return the number of viable paths as an integer.

    Examples

    input = [[0, 0, 1],
             [0, 0, 1],
             [1, 0, 0]]
    
    count_paths(input)  // 2
    

    In this case, there are two viable paths, starting at the top left:

    • right, down, down, right
    • down, right, down, right
    proposed challenge 
    opened by ericwburden 0
Owner
Code Connector
Code Connector
The place to come for pair programming practice problems in your language, designed for new and old developers alike.

Coding Dojo About The Coding Dojo is a project and weekly meetup hosted by Code Connector to offer opportunities for learning, mentoring, and practici

Code Connector 10 Apr 20, 2021
RxJava bindings for JavaFX

RxJavaFX: JavaFX bindings for RxJava Read the free eBook Learning RxJava with JavaFX to get started. RxJavaFX is a lightweight library to convert Java

ReactiveX 488 Mar 9, 2021
Reactive event streams, observable values and more for JavaFX.

ReactFX ReactFX is an exploration of (functional) reactive programming techniques for JavaFX. These techniques usually result in more concise code, le

Tomas Mikula 336 Mar 8, 2021
A framework for easily creating a UI for application settings / preferences.

PreferencesFX Preference dialogs for business applications made easy. Creating preference dialogs in Java has never been this easy! Table of Contents

DLSC Software & Consulting GmbH 449 Mar 11, 2021
A lightweight RCP framework for JavaFX applications.

WorkbenchFX The one and only framework to build large JavaFX Applications! Maven To use this framework as part of your Maven build simply add the foll

DLSC Software & Consulting GmbH 399 May 6, 2021
Desktop/Mobile JavaFX application framework

Basilisk is desktop/mobile application development platform for the JVM. Inspired by Griffon, Basilisk leverages JavaFX and JavafXPorts to bring the s

Basilisk 51 Feb 3, 2021
Download, Install, Update

What is it? Getdown (yes, it's the funky stuff) is a system for deploying Java applications to end-user computers, as well as keeping those applicatio

Three Rings 416 Feb 7, 2021
Rich-text area for JavaFX

RichTextFX RichTextFX provides a memory-efficient text area for JavaFX that allows the developer to style ranges of text, display custom objects in-li

null 898 Mar 11, 2021
Custom JavaFX bindings made easy with lambdas.

EasyBind EasyBind leverages lambdas to reduce boilerplate when creating custom bindings, provides a type-safe alternative to Bindings.select* methods

Tomas Mikula 142 Feb 13, 2021
CSS keyframe animation for JavaFX. Create animations like you would do with CSS.

JFXAnimation CSS keyframe animation for JavaFX. If you are using JFoenix JFXAnimation is included (currently version 1.0.0 only) Requirements JDK 8 an

Marcel Schlegel 40 Jul 21, 2020
📊 Exposing charts from Java to JavaFX and the Web!

Exposing charts from Java to JavaFX and to the Web! JavaFX · Charts · Websockets · Jetty · Web JavaFxDataviewer is an open-source data visualization t

jasrodis 56 Oct 27, 2020
Old and archived; More recent development is in https://github.com/Create-Fabric/Create-Refabricated.

NOW ARCHIVED Go here for the continuation of this project. Old README Create Fabric A Fabric port of Create. Create Discord: https://discord.gg/AjRTh6

null 13 Mar 18, 2021
Flow Visualization Library for JavaFX and VRL-Studio

VWorkflows Interactive flow/graph visualization for building domain specific visual programming environments. Provides UI bindings for JavaFX. See htt

Michael Hoffer 224 Mar 3, 2021
Undo manager for JavaFX

This project is no longer being maintained. See this issue for more details. UndoFX UndoFX is a general-purpose undo manager for JavaFX (or Java appli

null 69 Nov 10, 2020