Skip to content

Commit 95cf21c

Browse files
committed
folders name changed
1 parent 5a3b4af commit 95cf21c

File tree

24 files changed

+51
-9
lines changed

24 files changed

+51
-9
lines changed

03_Number System/numberSystem.txt

Whitespace-only changes.

02_Pattern Questions/Merged_Patterns/Pattern1.java renamed to DS_02_Pattern_Questions/Merged_Patterns/Pattern1.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package Merged_Patterns;
1+
package DS_02_Pattern_Questions.Merged_Patterns;
22

33
public class Pattern1 {
44
public static void main(String[] args) {
@@ -143,4 +143,17 @@ static void pattern5(int n){
143143
System.out.println();
144144
}
145145
}
146+
// pattern5 output
147+
// ************
148+
// ***** *****
149+
// **** ****
150+
// *** ***
151+
// ** **
152+
// * *
153+
// ** **
154+
// *** ***
155+
// **** ****
156+
// ***** *****
157+
// ************
158+
146159
}

02_Pattern Questions/Pattern_With_Spaces/Pattern.java renamed to DS_02_Pattern_Questions/Pattern_With_Spaces/Pattern.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package Pattern_With_Spaces;
1+
package DS_02_Pattern_Questions.Pattern_With_Spaces;
22

33
public class Pattern {
44
public static void main(String[] args) {

02_Pattern Questions/Pattern_with_Alphabets/Pattern.java renamed to DS_02_Pattern_Questions/Pattern_with_Alphabets/Pattern.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package Pattern_with_Alphabets;
1+
package DS_02_Pattern_Questions.Pattern_with_Alphabets;
22

33
public class Pattern {
44
public static void main(String[] args) {

02_Pattern Questions/Patterns_With_Numbers/Pattern.java renamed to DS_02_Pattern_Questions/Patterns_With_Numbers/Pattern.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package Patterns_With_Numbers;
1+
package DS_02_Pattern_Questions.Patterns_With_Numbers;
22

33
public class Pattern {
44
public static void main(String[] args) {
File renamed without changes.

02_Pattern Questions/Star_Patterns/Pattern.java renamed to DS_02_Pattern_Questions/Star_Patterns/Pattern.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
package Star_Patterns;
1+
package DS_02_Pattern_Questions.Star_Patterns;
22

33
import java.util.Scanner;
44

55
public class Pattern {
66
public static void main(String[] args) {
7-
Scanner input = new Scanner(System.in);
8-
pattern2(input.nextInt());
7+
Scanner sc = new Scanner(System.in);
8+
int n = sc.nextInt();
9+
pattern2(n);
910
}
1011

1112
static void pattern1(int n) {
@@ -54,6 +55,4 @@ static void pattern3(int n) {
5455
// **
5556
// *
5657

57-
58-
5958
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
package DS_03_Number_System.Bit_Manipulation;
2+
public class Basics {
3+
public static void main(String[] args) {
4+
// isOddOrEven(3);
5+
6+
System.out.println(multiplyByTwo(6));
7+
// swap two number using bitwise operators
8+
// int a = 2;
9+
// int b = 3;
10+
11+
}
12+
13+
// find wheather a number is odd or even
14+
static void isOddOrEven(int n) {
15+
if ((n & 1) == 0) {
16+
System.out.println("Number is Even");
17+
} else {
18+
System.out.println("Number is Odd");
19+
}
20+
}
21+
22+
// multiply number by two using bitwise operators
23+
static int multiplyByTwo(int n){
24+
return n << 1;
25+
}
26+
27+
28+
}
29+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
bitwise operatos - &, |, ^, ~, >>, <<, >>>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)