Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
Exhaustive Search In Class
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SOFT Core
SOFT 260
Exhaustive Search In Class
Commits
67188590
Commit
67188590
authored
1 year ago
by
Brady James Garvin
Browse files
Options
Downloads
Patches
Plain Diff
Flavor Markdown.
parent
84f194d4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
exhaustive-search.md
+5
-5
5 additions, 5 deletions
exhaustive-search.md
with
5 additions
and
5 deletions
exhaustive-search.md
+
5
−
5
View file @
67188590
...
@@ -16,7 +16,7 @@ Postcondition:
...
@@ -16,7 +16,7 @@ Postcondition:
(If
`p`
is a post, then
`p.tags`
gives its tags as a set of strings.)
(If
`p`
is a post, then
`p.tags`
gives its tags as a set of strings.)
```
```
js
function
filter
(
posts
,
tag
)
{
function
filter
(
posts
,
tag
)
{
// …
// …
}
}
...
@@ -51,7 +51,7 @@ green, and blue.)
...
@@ -51,7 +51,7 @@ green, and blue.)
(If
`g`
is a graph, then
`g.vertices`
gives its vertices as a set.)
(If
`g`
is a graph, then
`g.vertices`
gives its vertices as a set.)
```
```
js
function
color
(
graph
)
{
function
color
(
graph
)
{
// …
// …
for
(
const
coloring
of
mappings
(
graph
.
vertices
,
PALETTE
))
{
for
(
const
coloring
of
mappings
(
graph
.
vertices
,
PALETTE
))
{
...
@@ -85,7 +85,7 @@ of vertex pairs.)
...
@@ -85,7 +85,7 @@ of vertex pairs.)
(The parameter
`coloring`
is assumed to hold a dictionary that maps
(The parameter
`coloring`
is assumed to hold a dictionary that maps
vertices to colors.)
vertices to colors.)
```
```
js
function
isValidColoring
(
graph
,
coloring
)
{
function
isValidColoring
(
graph
,
coloring
)
{
// …
// …
}
}
...
@@ -112,7 +112,7 @@ Sad path:
...
@@ -112,7 +112,7 @@ Sad path:
### JavaScript
### JavaScript
```
```
js
function
knapsack
(
items
,
getWeight
,
weightLimit
,
getValue
)
{
function
knapsack
(
items
,
getWeight
,
weightLimit
,
getValue
)
{
// …
// …
for
(
const
option
of
options
(
items
,
getWeight
,
weightLimit
))
{
for
(
const
option
of
options
(
items
,
getWeight
,
weightLimit
))
{
...
@@ -139,7 +139,7 @@ Postcondition:
...
@@ -139,7 +139,7 @@ Postcondition:
#### JavaScript
#### JavaScript
```
```
js
function
options
(
items
,
getWeight
,
weightLimit
)
{
function
options
(
items
,
getWeight
,
weightLimit
)
{
// …
// …
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment