Skip to content

Instantly share code, notes, and snippets.

View jaideepjagyasi's full-sized avatar
🏠
Working from home

Jaideep Jagyasi jaideepjagyasi

🏠
Working from home
  • TATA Consultancy Services
  • Ahmedabad, Gujarat, India
View GitHub Profile
FAQ: Why do we specify the Coach interface in getBean()?
Question
Why do we specify the Coach interface in getBean()?
For example:
Coach theCoach = context.getBean("myCoach", Coach.class);
---
public boolean isPalindrome(String str){
boolean result=false;
if(str!=null && !str.equals("")){
int i=0;
int j=str.length()-1;
while(i<j){
if(str.charAt(i)!=str.charAt(j){
break;
}
i++;
//Complete this code or write your own from scratch
import java.util.*;
import java.io.*;
class Solution{
public static void main(String []argh){
Scanner in = new Scanner(System.in);
int n = in.nextInt();
HashMap<String,Integer> map=new HashMap<String,Integer>();
for(int i = 0; i < n; i++){
import java.io.*;
import java.util.*;
public class Solution {
public static void main(String[] args) {
/* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */
Scanner sc=new Scanner(System.in);
int T=sc.nextInt();
for(int i=1;i<=T;i++)
#include<stdio.h>
int main(){
int n;
int temp=0;
int res=0;
printf("Enter number");
scanf("%d",&n);
temp=n%10;
n=n/10;
res+=temp;
#include<iostream>
#include<string>
using namespace std;
bool isPalindrome(string str,int len);
int main(){
string s;
cin>>s;
if(isPalindrome(s,s.length())){
cout<<"true"<<endl;
//Client
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.util.Scanner;
import java.util.concurrent.ThreadLocalRandom;
/*