|
1 | 1 | # Java Coding Problems
|
2 | 2 |
|
3 |
| -*`updated July 26, 2024`* |
| 3 | +*`updated July 28, 2024`* |
4 | 4 |
|
5 | 5 | [](https://hits.seeyoufarm.com)
|
6 | 6 |
|
7 |
| -These are the most coding problems during |
| 7 | +These are the most common coding problems being asked during |
8 | 8 | technical interviews, as I experienced it myself.
|
9 | 9 |
|
10 | 10 | ## Running The Code
|
| 11 | +It's the convenience of Codespaces online! Simply create a Codespace, you don't need to install anything, just run using Bash. |
11 | 12 |
|
12 |
| -It's the convenience of the Codespaces online! |
13 |
| -Simply create a Codespace, you don't need to install |
14 |
| -anything, just simply run using Bash. |
| 13 | +### Steps to Run the Code |
| 14 | +1. **Fork the Repository**: |
| 15 | + - Navigate to the repository you want to fork. |
| 16 | + - Click the "Fork" button at the top right corner of the page. |
15 | 17 |
|
16 |
| -First step is to fork this repo, once there, click Code, |
17 |
| -and if you have the Codespaces, you will see like this : |
| 18 | +2. **Create a Codespace**: |
| 19 | + - Go to your forked repository. |
| 20 | + - Click the "Code" button. |
| 21 | + - Select "Open with Codespaces" from the dropdown menu. |
| 22 | + - If you have Codespaces enabled, you will see an interface like this: |
| 23 | +  |
18 | 24 |
|
19 |
| - |
| 25 | +3. **Navigate to the Source Directory**: |
| 26 | + - Open the terminal in Codespaces. |
| 27 | + - Change the directory to `src`: |
| 28 | + ```bash |
| 29 | + cd src |
| 30 | + ``` |
20 | 31 |
|
21 |
| -Also starting Java 11, you can now run it even without compiling ! |
| 32 | +4. **Run the Java File**: |
| 33 | + - Starting with Java 11, you can run Java files without compiling them first. Use the following command: |
22 | 34 |
|
23 |
| -``` |
24 |
| -cd src |
25 |
| -``` |
| 35 | + ```bash |
| 36 | + java [NameOfTheFile].java |
| 37 | + ``` |
26 | 38 |
|
27 |
| -then |
| 39 | +this is the sample interface of the online Codespaces |
28 | 40 |
|
29 |
| -``` |
30 |
| -java [NameOfTheFile].java |
31 |
| -``` |
| 41 | + |
32 | 42 |
|
33 |
| -this is the interface of the online Codespaces |
34 |
| - |
35 |
| - |
36 |
| - |
37 |
| -enjoy ! |
| 43 | +enjoy! |
38 | 44 |
|
39 | 45 | ## Source Code
|
40 | 46 | 1. **Binary Search**
|
|
0 commit comments