From 5ac51fbddd70cb751f507e4eba7da3bf6845ec70 Mon Sep 17 00:00:00 2001 From: Juan Jose Jaramillo Tamayo Date: Sun, 19 Apr 2026 20:23:47 -0500 Subject: [PATCH 1/6] fix: adjust rootDir in tsconfig.spec.json and add router-oulet to app.html --- src/app/app.html | 1 + tsconfig.app.json | 1 + tsconfig.spec.json | 1 + 3 files changed, 3 insertions(+) diff --git a/src/app/app.html b/src/app/app.html index 757f721..6932d8f 100644 --- a/src/app/app.html +++ b/src/app/app.html @@ -1,4 +1,5 @@

Hello, {{ title() }}

{{ doubleTitle() }}

+ diff --git a/tsconfig.app.json b/tsconfig.app.json index 264f459..e4dd97c 100644 --- a/tsconfig.app.json +++ b/tsconfig.app.json @@ -4,6 +4,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/app", + "rootDir": "./src", "types": [] }, "include": [ diff --git a/tsconfig.spec.json b/tsconfig.spec.json index d383706..2415dbd 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -4,6 +4,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "./out-tsc/spec", + "rootDir": "./src/app", "types": [ "vitest/globals" ] From a6af12651fd22e3c31e2324b085670b3b7ae7f53 Mon Sep 17 00:00:00 2001 From: Juan Jose Jaramillo Tamayo Date: Sun, 19 Apr 2026 20:55:26 -0500 Subject: [PATCH 2/6] feat: configure routing and feature module for challenge-workspace --- src/app/app.routes.ts | 13 ++++++++++++- .../challenge-workspace.routes.ts | 9 +++++++++ .../challenge-workspace/challenge-workspace.ts | 2 ++ .../challenge-workspace/challenge-workspace.ts | 13 +++++++++++++ 4 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 src/app/features/challenge-workspace/challenge-workspace.routes.ts create mode 100644 src/app/features/challenge-workspace/challenge-workspace.ts create mode 100644 src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.ts diff --git a/src/app/app.routes.ts b/src/app/app.routes.ts index dc39edb..b87bd52 100644 --- a/src/app/app.routes.ts +++ b/src/app/app.routes.ts @@ -1,3 +1,14 @@ import { Routes } from '@angular/router'; -export const routes: Routes = []; +export const routes: Routes = [ + { + path: '', + redirectTo: 'challenge-workspace', + pathMatch: 'full' + }, + { + path: 'challenge-workspace', + loadChildren: () => + import('./features/challenge-workspace/challenge-workspace').then(m => m.challengeWorkspaceRoutes) + } +]; diff --git a/src/app/features/challenge-workspace/challenge-workspace.routes.ts b/src/app/features/challenge-workspace/challenge-workspace.routes.ts new file mode 100644 index 0000000..b981be3 --- /dev/null +++ b/src/app/features/challenge-workspace/challenge-workspace.routes.ts @@ -0,0 +1,9 @@ +import { Routes } from '@angular/router'; +import { ChallengeWorkspaceContainer } from './containers/challenge-workspace/challenge-workspace'; + +export const challengeWorkspaceRoutes: Routes = [ + { + path: '', + component: ChallengeWorkspaceContainer + } +]; \ No newline at end of file diff --git a/src/app/features/challenge-workspace/challenge-workspace.ts b/src/app/features/challenge-workspace/challenge-workspace.ts new file mode 100644 index 0000000..8338725 --- /dev/null +++ b/src/app/features/challenge-workspace/challenge-workspace.ts @@ -0,0 +1,2 @@ +export { ChallengeWorkspaceContainer } from './containers/challenge-workspace/challenge-workspace'; +export { challengeWorkspaceRoutes } from './challenge-workspace.routes'; \ No newline at end of file diff --git a/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.ts b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.ts new file mode 100644 index 0000000..187fc81 --- /dev/null +++ b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.ts @@ -0,0 +1,13 @@ +import { Component } from '@angular/core'; + +@Component({ + selector: 'app-challenge-workspace', + standalone: true, + imports: [], + templateUrl: './challenge-workspace.html', + styleUrl: './challenge-workspace.css' +}) + +export class ChallengeWorkspaceContainer { + +} \ No newline at end of file From cfd94493c1c1da0d49b3af6faab01a36d13b7602 Mon Sep 17 00:00:00 2001 From: Juan Jose Jaramillo Tamayo Date: Sun, 19 Apr 2026 23:21:06 -0500 Subject: [PATCH 3/6] feat: add challenge-workspace HTML structure with header, toolbar, panels, and footer --- src/app/app.html | 4 - src/app/app.ts | 3 +- .../challenge-workspace.html | 85 +++++++++++++++++++ 3 files changed, 86 insertions(+), 6 deletions(-) create mode 100644 src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html diff --git a/src/app/app.html b/src/app/app.html index 6932d8f..0680b43 100644 --- a/src/app/app.html +++ b/src/app/app.html @@ -1,5 +1 @@ -

Hello, {{ title() }}

-

{{ doubleTitle() }}

- - diff --git a/src/app/app.ts b/src/app/app.ts index 89fc8ac..0d36b4d 100644 --- a/src/app/app.ts +++ b/src/app/app.ts @@ -2,11 +2,10 @@ import { Component, computed, signal, effect } from '@angular/core'; import { RouterOutlet } from '@angular/router'; import { ApplicationService } from './application'; -import { Button } from './components/button/button'; @Component({ selector: 'app-root', - imports: [RouterOutlet, Button], + imports: [RouterOutlet], templateUrl: './app.html', styleUrl: './app.css', }) diff --git a/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html new file mode 100644 index 0000000..8d1975e --- /dev/null +++ b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html @@ -0,0 +1,85 @@ +
+
+ + +
+ +
+
+ + + +
+ +
+ JavaScript +
+
+ +
+
+ +
+

1. Two Sum

+

Given an array of integers nums and an integer target, return indices of the two numbers such that they add up to target.

+

You may assume that each input would have exactly one solution, and you may not use the same element twice.

+

You can return the answer in any order.

+ +
+

Example 1:

+
Input: nums = [2,7,11,15], target = 9
+Output: [0,1] 
+Explanation: Because nums[0] + nums[1] == 9, we return [0, 1].
+
+ +
+

Example 2:

+
Input: nums = [3,2,4], target = 6
+Output: [1,2]
+
+ +
+

Example 3:

+
Input: nums = [3,3], target = 6
+Output: [0,1]
+
+ +

Constraints:

+
    +
  • 2 <= nums.length <= 10^4
  • +
  • -10^9 <= nums[i] <= 10^9
  • +
  • -10^9 <= target <= 10^9
  • +
  • Only one valid answer exists.
  • +
+
+
+ +
+
+
var twoSum = function(nums, target) {
+    const map = new Map();
+            
+    for (let i = 0; i < nums.length; i++) {
+        const complement = target - nums[i];
+            
+        if (map.has(complement)) {
+            return [map.get(complement), i];
+        }
+        map.set(nums[i], i);
+    }
+        
+    return [];
+};
+ +
+
+ +
+ +
+ + +
+
\ No newline at end of file From eb933de5da6975df9cf344f3200b6d275855ff5b Mon Sep 17 00:00:00 2001 From: Juan Jose Jaramillo Tamayo Date: Wed, 22 Apr 2026 16:27:13 -0500 Subject: [PATCH 4/6] fix: correct service type in application.spec.ts from Application to ApplicationService --- src/app/application.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/application.spec.ts b/src/app/application.spec.ts index 4a2d79c..27a4a25 100644 --- a/src/app/application.spec.ts +++ b/src/app/application.spec.ts @@ -1,13 +1,13 @@ import { TestBed } from '@angular/core/testing'; -import { Application } from './application'; +import { ApplicationService } from './application'; describe('Application', () => { - let service: Application; + let service: ApplicationService; beforeEach(() => { TestBed.configureTestingModule({}); - service = TestBed.inject(Application); + service = TestBed.inject(ApplicationService); }); it('should be created', () => { From f0edb0ecb534b41b90407e34b6ef004253cbaa01 Mon Sep 17 00:00:00 2001 From: Juan Jose Jaramillo Tamayo Date: Wed, 22 Apr 2026 16:28:05 -0500 Subject: [PATCH 5/6] fix: correct html entity references --- .../challenge-workspace/challenge-workspace.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html index 8d1975e..a6cb96d 100644 --- a/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html +++ b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.html @@ -48,9 +48,9 @@

1. Two Sum

Constraints:

    -
  • 2 <= nums.length <= 10^4
  • -
  • -10^9 <= nums[i] <= 10^9
  • -
  • -10^9 <= target <= 10^9
  • +
  • 2 <= nums.length <= 10^4
  • +
  • -10^9 <= nums[i] <= 10^9
  • +
  • -10^9 <= target <= 10^9
  • Only one valid answer exists.
@@ -61,7 +61,7 @@

1. Two Sum

var twoSum = function(nums, target) {
     const map = new Map();
             
-    for (let i = 0; i < nums.length; i++) {
+    for (let i = 0; i < nums.length; i++) {
         const complement = target - nums[i];
             
         if (map.has(complement)) {

From 6ea7e2c3d29f53c58619efd1371ea1f2b94780d1 Mon Sep 17 00:00:00 2001
From: Juan Jose Jaramillo Tamayo 
Date: Wed, 22 Apr 2026 18:00:59 -0500
Subject: [PATCH 6/6] feat: implement challenge-workspace layout structure with
 responsive design

---
 .../challenge-workspace.css                   | 166 ++++++++++++++++++
 1 file changed, 166 insertions(+)
 create mode 100644 src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.css

diff --git a/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.css b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.css
new file mode 100644
index 0000000..ec9e3be
--- /dev/null
+++ b/src/app/features/challenge-workspace/containers/challenge-workspace/challenge-workspace.css
@@ -0,0 +1,166 @@
+:host {
+  display: block;
+  min-height: 100vh;
+  background: #0f0f10;
+  color: #f3f3f3;
+  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
+}
+
+* {
+  box-sizing: border-box;
+}
+
+.workspace-layout {
+  min-height: 100dvh;
+  display: grid;
+  grid-template-rows: 56px 48px 1fr 56px;
+  overflow: hidden;
+}
+
+.top-header,
+.workspace-toolbar,
+.workspace-footer {
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  padding: 0 16px;
+  background: #17171a;
+  border-color: #2a2a2a;
+}
+
+.top-header,
+.workspace-toolbar {
+  border-bottom: 1px solid #2a2a2a;
+}
+
+.logo {
+  font-size: 1rem;
+  font-weight: 700;
+}
+
+.top-nav span {
+  color: #b6b6b8;
+  font-size: 14px;
+}
+
+.problem-tabs {
+  display: flex;
+  gap: 4px;
+}
+
+.tab {
+  border: 0;
+  background: transparent;
+  color: #b6b6b8;
+  padding: 8px 10px;
+  cursor: pointer;
+  border-bottom: 2px solid transparent;
+}
+
+.tab.active {
+  color: #f3f3f3;
+  border-bottom-color: #facc15;
+}
+
+.language-tab span {
+  display: inline-block;
+  padding: 4px 10px;
+  border: 1px solid #2a2a2a;
+  border-radius: 6px;
+  color: #d4d4d4;
+  font-size: 13px;
+}
+
+.workspace-main {
+  min-height: 0;
+  display: grid;
+  grid-template-columns: 1fr 1fr;
+  overflow: hidden;
+}
+
+.workspace-panel {
+  min-height: 0;
+  overflow: auto;
+  padding: 20px;
+  background: #141416;
+}
+
+.workspace-problem {
+  border-right: 1px solid #2a2a2a;
+}
+
+.workspace-editor {
+  background: #0d0d0f;
+}
+
+.problem-content h1 {
+  margin-bottom: 12px;
+  font-size: 1.8rem;
+}
+
+.problem-content p {
+  margin-bottom: 10px;
+  line-height: 1.5;
+  color: #d4d4d4;
+}
+
+.example-card {
+  margin-top: 14px;
+  padding: 12px;
+  border: 1px solid #2a2a2a;
+  border-radius: 8px;
+  background: #17171a;
+}
+
+.example-card pre,
+.editor-content pre {
+  margin-top: 8px;
+  white-space: pre-wrap;
+  word-break: break-word;
+  color: #d4d4d4;
+  font-size: 14px;
+  line-height: 1.45;
+}
+
+.problem-content ul {
+  margin-top: 8px;
+  padding-left: 20px;
+}
+
+.problem-content li {
+  margin-bottom: 6px;
+  color: #d4d4d4;
+}
+
+.workspace-footer {
+  justify-content: flex-end;
+  gap: 10px;
+  border-top: 1px solid #2a2a2a;
+}
+
+.btn {
+  border: 1px solid #2a2a2a;
+  background: #141416;
+  color: #f3f3f3;
+  border-radius: 8px;
+  padding: 8px 14px;
+  cursor: pointer;
+}
+
+.btn-primary {
+  border-color: #eab308;
+  background: #facc15;
+  color: #111111;
+  font-weight: 700;
+}
+
+@media (max-width: 900px) {
+  .workspace-main {
+    grid-template-columns: 1fr;
+  }
+
+  .workspace-problem {
+    border-right: 0;
+    border-bottom: 1px solid #2a2a2a;
+  }
+}
\ No newline at end of file