Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
3d2f9b2
Add DSA problems data
SyedHannanMehdi Mar 29, 2026
7b63ff1
Add mock code execution engine
SyedHannanMehdi Mar 29, 2026
324d384
Add DSA problems data with test cases and validators
SyedHannanMehdi Mar 29, 2026
ec2ca87
Add mock code executor for JS and Python
SyedHannanMehdi Mar 29, 2026
978f52b
Add DSA problems data with test cases
SyedHannanMehdi Mar 29, 2026
3c01533
Add mock code runner for JS/Python test execution
SyedHannanMehdi Mar 29, 2026
7e13e8e
Add DSA problems data with test cases
SyedHannanMehdi Mar 29, 2026
bbcdd49
Add mock code executor for JS/Python
SyedHannanMehdi Mar 29, 2026
dc0d165
Add DSA problems data with test cases
SyedHannanMehdi Mar 29, 2026
2cecfeb
Add lightweight CodeEditor with syntax highlighting
SyedHannanMehdi Mar 29, 2026
58139a5
Add TestResultPanel component
SyedHannanMehdi Mar 29, 2026
13141b1
Add ProblemPanel component
SyedHannanMehdi Mar 29, 2026
c3e1fe5
Add main DSARound component with full layout
SyedHannanMehdi Mar 29, 2026
1432063
fix: move problems.js to client/src, fix validator shape to data-driv…
SyedHannanMehdi Mar 29, 2026
322eed0
fix: move codeRunner.js to client/src, make checkEquality data-driven…
SyedHannanMehdi Mar 29, 2026
9c2f799
fix: move codeExecutor.js to client/src, align validator to use probl…
SyedHannanMehdi Mar 29, 2026
7f70149
Add DSA problems data with test cases
SyedHannanMehdi Mar 29, 2026
9210acc
Add code executor utility for running test cases
SyedHannanMehdi Mar 29, 2026
881cac2
feat: add DSA problems data with test cases and evaluators
SyedHannanMehdi Mar 29, 2026
0512d90
fix: move problems.js to client/src, use data-driven orderInsensitive…
SyedHannanMehdi Mar 29, 2026
d82dccd
fix: move codeRunner.js to client/src, replace hard-coded id===1 with…
SyedHannanMehdi Mar 29, 2026
369e7f0
fix: move codeExecutor.js to client/src, remove problem.validator dep…
SyedHannanMehdi Mar 29, 2026
9cca6e0
feat: add DSARound React component with problem list, description pan…
SyedHannanMehdi Mar 29, 2026
da455ce
feat: add DSARound CSS styles for LeetCode-style layout
SyedHannanMehdi Mar 29, 2026
b501f92
fix: deprecate misplaced src/components/DSARound/problems.js, re-expo…
SyedHannanMehdi Mar 29, 2026
3e3d07c
fix: deprecate misplaced src/components/DSARound/codeRunner.js, re-ex…
SyedHannanMehdi Mar 29, 2026
9fef71d
fix: deprecate misplaced src/components/DSARound/codeExecutor.js, re-…
SyedHannanMehdi Mar 29, 2026
72773dc
feat: add DSA problems with test cases
SyedHannanMehdi Mar 30, 2026
a29717a
feat: add mock code executor for JS/Python
SyedHannanMehdi Mar 30, 2026
06c549d
feat: add DSA coding interface barrel export
SyedHannanMehdi Mar 30, 2026
de4c207
feat: add DSA problems data with test cases and mock solutions
SyedHannanMehdi Mar 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
317 changes: 317 additions & 0 deletions client/src/components/DSARound/DSARound.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,317 @@
/* ── Layout ── */
.dsa-round {
display: flex;
height: 100vh;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
Ubuntu, sans-serif;
background: #1a1a2e;
color: #e0e0e0;
overflow: hidden;
}

/* ── Sidebar ── */
.dsa-sidebar {
width: 240px;
min-width: 200px;
background: #16213e;
border-right: 1px solid #0f3460;
display: flex;
flex-direction: column;
overflow-y: auto;
}

.dsa-sidebar__title {
padding: 16px;
font-size: 14px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
color: #8892b0;
border-bottom: 1px solid #0f3460;
margin: 0;
}

.dsa-problem-list {
list-style: none;
padding: 0;
margin: 0;
}

.dsa-problem-list__item {
display: flex;
align-items: center;
gap: 6px;
padding: 10px 16px;
cursor: pointer;
border-left: 3px solid transparent;
transition: background 0.15s, border-color 0.15s;
font-size: 13px;
}

.dsa-problem-list__item:hover {
background: #0f3460;
}

.dsa-problem-list__item--active {
background: #0f3460;
border-left-color: #e94560;
}

.dsa-problem-list__id {
color: #8892b0;
min-width: 24px;
}

.dsa-problem-list__name {
flex: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.dsa-problem-list__difficulty {
font-size: 11px;
font-weight: 600;
white-space: nowrap;
}

/* ── Main panel ── */
.dsa-main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden;
}

/* ── Description ── */
.dsa-description {
flex: 0 0 auto;
max-height: 40%;
overflow-y: auto;
padding: 20px 24px;
background: #16213e;
border-bottom: 1px solid #0f3460;
}

.dsa-description__header {
display: flex;
align-items: center;
gap: 12px;
margin-bottom: 12px;
}

.dsa-description__title {
font-size: 18px;
font-weight: 700;
margin: 0;
}

.dsa-description__badge {
padding: 2px 10px;
border-radius: 12px;
font-size: 12px;
font-weight: 600;
color: #1a1a2e;
}

.dsa-description__body {
font-size: 14px;
line-height: 1.7;
margin-bottom: 16px;
}

.dsa-example {
margin-bottom: 12px;
font-size: 13px;
}

.dsa-example__block {
background: #0f3460;
border-radius: 6px;
padding: 10px 14px;
margin-top: 6px;
font-family: "Fira Code", "Cascadia Code", monospace;
font-size: 12px;
white-space: pre-wrap;
word-break: break-word;
}

.dsa-constraints {
font-size: 13px;
}

.dsa-constraints ul {
margin: 6px 0 0 0;
padding-left: 20px;
}

.dsa-constraints li {
margin-bottom: 4px;
}

/* ── Editor ── */
.dsa-editor-section {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
background: #1a1a2e;
}

.dsa-editor-toolbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px 16px;
background: #16213e;
border-bottom: 1px solid #0f3460;
}

.dsa-editor-toolbar__lang {
font-size: 12px;
color: #8892b0;
font-weight: 500;
}

.dsa-editor-toolbar__actions {
display: flex;
gap: 8px;
}

.dsa-btn {
padding: 6px 16px;
border-radius: 6px;
border: none;
font-size: 13px;
font-weight: 600;
cursor: pointer;
transition: opacity 0.15s;
}

.dsa-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}

.dsa-btn--primary {
background: #e94560;
color: #fff;
}

.dsa-btn--primary:hover:not(:disabled) {
opacity: 0.85;
}

.dsa-btn--secondary {
background: #0f3460;
color: #e0e0e0;
}

.dsa-btn--secondary:hover {
opacity: 0.8;
}

.dsa-editor {
flex: 1;
resize: none;
background: #0d1117;
color: #c9d1d9;
border: none;
padding: 16px;
font-family: "Fira Code", "Cascadia Code", "Courier New", monospace;
font-size: 13px;
line-height: 1.6;
outline: none;
tab-size: 2;
}

/* ── Results ── */
.dsa-results {
max-height: 30%;
overflow-y: auto;
padding: 12px 16px;
background: #16213e;
border-top: 1px solid #0f3460;
}

.dsa-results__global-error {
color: #ff375f;
font-size: 13px;
background: rgba(255, 55, 95, 0.1);
padding: 10px 14px;
border-radius: 6px;
}

.dsa-results__summary {
font-size: 14px;
font-weight: 600;
margin-bottom: 10px;
}

.dsa-results__summary--pass {
color: #00b8a3;
}

.dsa-results__summary--fail {
color: #ff375f;
}

.dsa-test-cases {
display: flex;
flex-direction: column;
gap: 8px;
}

.dsa-test-case {
border-radius: 6px;
overflow: hidden;
font-size: 12px;
}

.dsa-test-case--pass {
border: 1px solid #00b8a3;
}

.dsa-test-case--fail {
border: 1px solid #ff375f;
}

.dsa-test-case__header {
padding: 6px 12px;
font-weight: 600;
}

.dsa-test-case--pass .dsa-test-case__header {
background: rgba(0, 184, 163, 0.15);
}

.dsa-test-case--fail .dsa-test-case__header {
background: rgba(255, 55, 95, 0.15);
}

.dsa-test-case__body {
padding: 8px 12px;
display: flex;
flex-direction: column;
gap: 4px;
background: rgba(255, 255, 255, 0.03);
}

.dsa-test-case__label {
color: #8892b0;
font-weight: 600;
}

/* ── Scrollbars ── */
.dsa-sidebar::-webkit-scrollbar,
.dsa-description::-webkit-scrollbar,
.dsa-results::-webkit-scrollbar {
width: 6px;
}

.dsa-sidebar::-webkit-scrollbar-thumb,
.dsa-description::-webkit-scrollbar-thumb,
.dsa-results::-webkit-scrollbar-thumb {
background: #0f3460;
border-radius: 3px;
}
Loading