This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<bits/stdc++.h> | |
| using namespace std; | |
| void pattern1(int n) { | |
| for (int i = 0; i < n; i++) | |
| { | |
| for (int j = 0; j < i+1; j++) | |
| { | |
| cout << "* "; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Solution { | |
| public: | |
| bool isOperator(char c) { | |
| return c == '+' || c == '-' || c == '*' || c == '/' || c == '^'; | |
| } | |
| int precedence(char op) { | |
| if (op == '+' || op == '-') return 1; | |
| if (op == '*' || op == '/') return 2; | |
| if (op == '^') return 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.sql.Connection; | |
| import java.sql.DriverManager; | |
| import java.sql.SQLException; | |
| class Main { | |
| public static void main(String[] args) { | |
| String url = "jdbc:mysql://localhost:3306/<database_name>"; | |
| String user = "<username>"; // default: root | |
| String password = "<password>"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Scanner; | |
| import java.lang.Math; | |
| class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| System.out.print("Enter a number: "); | |
| int num = sc.nextInt(); | |
| int temp = num; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.util.Random; | |
| import java.util.Scanner; | |
| class Game { | |
| int randNum; | |
| int userNum; | |
| int noOfGuesses = 0; | |
| public Game() { | |
| Random rand = new Random(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct TreeNode { | |
| int key; | |
| struct TreeNode* left; | |
| struct TreeNode* right; | |
| }; | |
| struct TreeNode* createNode(int key) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct TreeNode { | |
| int key; | |
| struct TreeNode* left; | |
| struct TreeNode* right; | |
| }; | |
| struct TreeNode* createNode(int key) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct Queue { | |
| int size; | |
| int front; | |
| int rear; | |
| int* arr; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<stdio.h> | |
| #include<stdlib.h> | |
| struct Stack { | |
| int size; | |
| int top; | |
| int *arr; | |
| }; | |
| struct Queue { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @echo off | |
| echo Installing a Python package... | |
| pip install yt-dlp | |
| echo Package installation complete. | |
| pause |
NewerOlder