1. Rearrange
Define a class in java to modify a word by bringing all the vowels in the word at the beginning followed by the consonants.
Answer :=
public class Rearrange {
private String word;
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <errno.h> | |
#include <sys/socket.h> | |
#include <netinet/in.h> | |
#include <arpa/inet.h> | |
#include <fcntl.h> | |
#include <getopt.h> |
1. Rearrange
Define a class in java to modify a word by bringing all the vowels in the word at the beginning followed by the consonants.
Answer :=
public class Rearrange {
private String word;
package bitsarr | |
import ( | |
"bytes" | |
"errors" | |
) | |
type bit byte | |
const ( |
1. 2D Array Operations
Write a Java program to perform the following operations on a given 2D array:
public class ArrayOperations {
package main | |
func ok() { | |
{ | |
{ | |
{ | |
{ | |
{ | |
{ | |
{ |
// Cleary did not used Chat GPT to generate comments for this code | |
package main | |
import ( | |
"bytes" // Package for working with byte buffers | |
"fmt" // Package for formatted I/O | |
"os" // Package for working with the operating system | |
) | |
const ( |
package Arrays.Sorting; | |
public class BubbleSort { | |
/* | |
* This method takes a int array as input | |
* Then sorts the array using BUBBLE SORT algorithm | |
* Then returns the sorted array | |
*/ | |
public static int[] sort(int[] arr) { | |
int n = arr.length; |