Skip to content

Commit

Permalink
bracket-push: rename to matching-brackets (#298)
Browse files Browse the repository at this point in the history
* bracket-push: rename to matching-brackets

This rename was proposed in:
exercism/problem-specifications#1501

The rationale for the name is:

* to name the exercise by its story, not by what it potentially teaches
* to avoid unnecessarily biasing the solution space

* 👀 rename reference in settings.gradle
  • Loading branch information
SleeplessByte authored and mikegehard committed May 28, 2019
1 parent 1a1d49f commit f6ac3eb
Show file tree
Hide file tree
Showing 12 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
]
},
{
"slug": "bracket-push",
"slug": "matching-brackets",
"uuid": "cbbbd7db-224f-45ca-a108-4dc6bc98e4a0",
"core": false,
"unlocked_by": "flatten-array",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import java.util.*
import java.util.Collections.asLifoQueue

object BracketPush {
object MatchingBrackets {

private val CLOSING_TO_OPENING_MAP = mapOf(
'}' to '{',
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Bracket Push
# Matching Brackets

Given a string containing brackets `[]`, braces `{}`, parentheses `()`,
or any combination thereof, verify that any and all pairs are matched
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import org.junit.runners.Parameterized
import kotlin.test.assertEquals

@RunWith(Parameterized::class)
class BracketPushTest(val input: String, val expectedOutput: Boolean) {
class MatchingBracketsTest(val input: String, val expectedOutput: Boolean) {

companion object {
@JvmStatic
Expand All @@ -32,7 +32,7 @@ class BracketPushTest(val input: String, val expectedOutput: Boolean) {

@Test
fun test() {
assertEquals(expectedOutput, BracketPush.isValid(input))
assertEquals(expectedOutput, MatchingBrackets.isValid(input))
}

}
2 changes: 1 addition & 1 deletion exercises/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ include 'beer-song'
include 'binary'
include 'binary-search'
include 'bob'
include 'bracket-push'
include 'change'
include 'clock'
include 'collatz-conjecture'
Expand All @@ -31,6 +30,7 @@ include 'leap'
include 'linked-list'
include 'list-ops'
include 'luhn'
include 'matching-brackets'
include 'meetup'
include 'minesweeper'
include 'nth-prime'
Expand Down

0 comments on commit f6ac3eb

Please sign in to comment.