Casa Retail Coding Questions and Answers
Casa Retail Coding Questions with Solutions
This page will help you get Casa Retail Coding Questions and Answers asked in the company’s Recruitment Process. Other than that you will find Insights on the Steps involved in the Recruitment Process, Eligibility Criteria, CTC Offered, Interview Rounds, and Job Profiles. Casa Retail offers various roles for freshers, to get more specific details please go through this page.
About Casa Retail
Casa Retail.AI is an AI-Driven CDP (Customer Data Platform) founded by Sat Vijayaraghavan, and Sundararajan Govindarajan in 2016, that attracts consumers in a quiet personalized way. CASA, as an omnichannel platform, assists retailers in increasing Customer Retention rates, Sales Revenue, and Customer Traffic to the brand by understanding both the customer’s requirements and the product’s characteristics.
CASA CDP contains several product suites powered by AI and ML, including ECommerce, CRM, Lead Management, Offer Management, and Smart Campaign Manager.
About Casa Retail Coding Recruitment Process
This Casa Retail Recruitment process consists of the following steps :
- Online Assessment [Coding Round]
- Technical Interviews [ 2 Rounds ]
- HR Interview
We have mentioned further details of the Casa Retail Coding Recruitment Process in the following Tabular Form
Casa Retail | Related Information |
---|---|
Position : | Full Stack / Backend Developer |
Course : |
|
Eligibility Criteria / Academic Qualification Required : |
|
Cost to Company (CTC) |
|
Selection Process : |
|
Joining Location : | Chennai |
Details of Casa Retail Recruitment Process
Casa Retail Recruitment Process starts with Online Coding assessment and followed 2 Technical Interviews, we have given the further details below :
Rounds | Topics | Time |
---|---|---|
Online Assessment | DSA – Based Coding | 2 Hours |
Technical Interview – 1 | Pair Programming – OOPs Concepts | 1.5 – 2 Hours |
Technical Interview – 2 | Data Modelling ( Using RDBMS ) | ~ 1.5 – 2 Hours |
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Casa Retail Coding Questions and Answers
Question 1: Bank Compare Problem
Problem Description :
Question – : There are two banks – Bank A and Bank B. Their interest rates vary. You have received offers from both banks in terms of the annual rate of interest, tenure, and variations of the rate of interest over the entire tenure.You have to choose the offer which costs you least interest and reject the other. Do the computation and make a wise choice.
The loan repayment happens at a monthly frequency and Equated Monthly Installment (EMI) is calculated using the formula given below :
EMI = loanAmount * monthlyInterestRate / ( 1 – 1 / (1 + monthlyInterestRate)^(numberOfYears * 12))
Constraints:
- 1 <= P <= 1000000
- 1 <=T <= 50
- 1<= N1 <= 30
- 1<= N2 <= 30
Input Format:
- First line: P principal (Loan Amount)
- Second line: T Total Tenure (in years).
- Third Line: N1 is the number of slabs of interest rates for a given period by Bank A. First slab starts from the first year and the second slab starts from the end of the first slab and so on.
- Next N1 line will contain the interest rate and their period.
- After N1 lines we will receive N2 viz. the number of slabs offered by the second bank.
- Next N2 lines are the number of slabs of interest rates for a given period by Bank B. The first slab starts from the first year and the second slab starts from the end of the first slab and so on.
- The period and rate will be delimited by single white space.
Output Format: Your decision either Bank A or Bank B.
Explanation:
- Example 1
- Input
- 10000
- 20
- 3
- 5 9.5
- 10 9.6
- 5 8.5
- 3
- 10 6.9
- 5 8.5
- 5 7.9
- Output: Bank B
- Example 2
- Input
- 500000
- 26
- 3
- 13 9.5
- 3 6.9
- 10 5.6
- 3
- 14 8.5
- 6 7.4
- 6 9.6
- Output: Bank A
#include<stdio.h> #include<math.h> int main() { double p,s,mi,sum,emi,bank[5],sq; int y,n,k,i,yrs,l=0; scanf(" %lf",&p); scanf(" %d",&y); for(k=0;k<2;k++) { scanf(" %d",&n); sum=0; for(i=0;i<n;i++) { scanf(" %d",&yrs); scanf(" %lf",&s); mi=0; sq=pow((1+s),yrs*12); emi= (p*(s))/(1-1/sq); sum= sum + emi; }bank[l++]=sum; } if(bank[0]<bank[1]) printf(" Bank A "); else printf(" Bank B "); return 0; }
10000 20 3 5 9.5 10 9.6 5 8.5 3 10 6.9 5 8.5 5 7.9 Bank B
#include <iostream> #include <cmath> using namespace std; int main() { double p,s,mi,sum,emi,bank[5],sq; int y,n,k,i,yrs,l=0; cin>>p; cin>>y; for(k=0;k<2;k++) { cin>>n; sum=0; for(i=0;i<n;i++) { cin>>yrs; cin>>s; mi=0; sq=pow((1+s),yrs*12); emi= (p*(s))/(1-1/sq); sum= sum + emi; } bank[l++]=sum; } if(bank[0]<bank[1]) cout<<("Bank A"); else cout<<("Bank B"); return 0; }
Output 10000 20 3 5 9.5 10 9.6 5 8.5 3 10 6.9 5 8.5 5 7.9 Bank B
import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); double p,s,mi,sum,emi,sq; int y,n,k,yrs,l=0; double[] bank = new double[5]; System.out.println("Enter the principal amount"); p = sc.nextDouble(); System.out.println("Enter tenature year"); y = sc.nextInt(); for (k = 0; k < 2; k++) { System.out.println("Enter the no of slabs"); n = sc.nextInt(); sum=0; for (int i = 0; i < n; i++) { System.out.println("Enter the period :"); yrs = sc.nextInt(); System.out.println("Enter the interest :"); s = sc.nextDouble(); mi=0; sq=Math.pow((1+s), yrs*12); emi=(p*(s))/(1-1/sq); sum=sum+emi; } bank[l++]=sum; } if(bank[0]<bank[1]) System.out.println("Bank A"); else System.out.println("Bank B"); } }
Output 10000 20 3 5 9.5 10 9.6 5 8.5 3 10 6.9 5 8.5 5 7.9 Bank B
bank = [] principal = int(input()) year = input() for i in range(0, 2): # 2 Banks installments = int(input()) sum = 0 for i in range(0, installments): time, roi = [float(i) for i in input().split()] square = pow((1+roi), time*12) emi = (principal*(roi)/(1-1/square)) sum = sum + emi bank.append(sum) if bank[0] < bank[1]: print("Bank A") else: print("Bank B")
Output 10000 20 3 5 9.5 10 9.6 5 8.5 3 10 6.9 5 8.5 5 7.9 Bank B
Question 2: Staircase Problem
Problem Description :
There are n stairs, a person standing at the bottom wants to reach the top. The person can climb either 1 stair or 2 stairs at a time.
- Count the number of ways, the person can reach the top.
#include <stdio.h> int calc(int n); int count(int x); int main () { int n ; printf("Enter number of stairs : "); scanf("%d", &n); printf("Number of ways = %d", count(n)); getchar(); return 0; } int count(int x) { return calc(x + 1); } int calc(int n) { if (n <= 1) return n; return calc(n-1) + calc(n-2); }
Output Enter number of stairs : 5 Number of ways = 8
#include <iostream> using namespace std; int calc(int n); int count(int x); int main () { int n ; cout<<("Enter number of stairs : "); cin>>n; cout<<("Number of ways = %d", count(n)); return 0; } int count(int x) { return calc(x + 1); } int calc(int n) { if (n <= 1) return n; return calc(n-1) + calc(n-2); }
Output Enter number of stairs : 5 8
import java.util.Scanner; public class Main { static int path(int m , int n) { if(m==1 || n==1) return 1; return path(m-1,n)+path(m,n-1); } public static void main(String[] args) { System.out.println(path(4,4)); } }
Output 5 8
n = int(input("Enter number of Stairs:")) def calc(x): if x <= 1: return x return calc(x - 1) + calc(x - 2) def count(n): return calc(n + 1) print("Number of ways:", count(n))
Output 5 8
Question 3:
You have a positive integer m and a non-negative integer s. Your task is to find the smallest and the largest of the numbers that have length m and sum of digits s. The required numbers should be non-negative integers written in the decimal base without leading zeroes.
Input
- The single line of the input contains a pair of integers m, s (1 ≤ m ≤ 100, 0 ≤ s ≤ 900) — the length and the sum of the digits of the required numbers.
Output
- In the output print the pair of the required non-negative integer numbers — first the minimum possible number, then — the maximum possible number. If no numbers satisfying conditions required exist, print the pair of numbers “-1 -1” (without the quotes).
Examples
- Input 1
2 15 - Output 1
69 96
- Input 2
3 0 - Output 2
-1 -1
#include<bits/stdc++.h> using namespace std; void number (int m, int s) { int sum = s; string mini = "", maxi = ""; if ((m != -1 and s == 0) or s > 9 * m) { cout << "-1 -1"; return; } for (int i = 0; i < m; i++) { int x = min (9, s); maxi += to_string (x); s = s - x; } for (int i = 0; i < m - 1; i++) { int x = min (9, sum); mini += to_string (x); sum -= x; } mini = to_string (sum) + mini; cout << mini << " " << maxi; return; } int main () { int m, s; cin >> m >> s; number (m, s); return 0; }
import java.util.*; class Solution { public static void solve(int m,int s) { int sum=s-1; if(m!=-1&&s==0 || s>9*m) { System.out.println("-1 -1"); return; } String res1="",res2=""; for(int i=0;i< m;i++) { res1+=Math.min(s,9); s=s-Math.min(9,s); } for(int i=0;i< m-1;i++) { res2+=Math.min(sum,9)+res2; sum=sum-Math.min(9,sum); } res2=(sum+1)+res2; System.out.println(res2+ " "+res1); } public static void main(String[] args) { Scanner sc=new Scanner(System.in); int m=sc.nextInt(); int s=sc.nextInt(); solve(m,s); } }
n,s=map(int,input().split()) if(n>1 and s==0): print(-1 , -1) elif(n==1 and s==0): print(0, 0) else: br=[0]*n i=0 brk=0 while(s>0): if(i=0): if(j==n-1 and br[j]==0): minm=minm+1 f=1 else: if(br[j]>0 and f==1): minm=minm*i + br[j]-1 f=0 else: minm=minm*i + br[j] #print('h') j=j-1 print(minm,maxm)
Question 4: HR issues
Problem statement -:
Shovon is an HR in a renowned company and he is assigning people to work. Now he is assigning people work in a fashion where if he assigns some work a work of cost 2, the next person will be strictly getting a job with cost equal or more than 2. Given that Shovon’s company has infinite work and a number of employees, how many distributions can be possible. The cost of jobs can go 0 to 9.
Function Description:
Complete the special_numbers function in the editor below. It has the following parameter(s):
Parameters:
Name | Type | Description |
N | Integer | The number of depts. |
arr[ ] | Integer array | The number of employees in each dept.. |
Return: The function must return an INTEGER denoting the sum of answers for all distinct distributions.
Constraints:
- 1 <= n <= 100
- 1 <= arr[i] <= 200
Sample Cases:
- Sample Input 1
2
4
1 - Sample Output 1
725 - Description
The ans if m = 1 is 10, which is all numbers from 0 to 9
The ans for m = 2 is 55
The answer for m = 3 is 220
The answer for m = 4 is 715
So fun(4) + fun(1) = 725
#include<bits/stdc++.h> using namespace std; int func(int s,int p,int n) { if(p==n-1) return 1; int ans=0; for(int i=s;i<=9;i++) ans+=func(i,p+1,n); return ans; } int main() { int n,a, ans=0; cin>>n; vector v(n); for(int i=0;i<n;i++) { cin>>a; for(int i=0;i<=9;i++) ans+=func(i,0,a); } cout<<ans; }
n=int(input()) a1=[] for i in range(n): a1.append(int(input())) dp=[0]*201 dp[1]=10 dp[2]=55 a=[1]*10 i=3 while i<201: s=0 for i1 in range(10): s+=a[i1] a[i1]=s dp[i]+=(s*(10-i1)) dp[i]=dp[i]%((10**9)+7) i+=1 s1=0 for i in a1: s1+=dp[i] s1=s1%((10**9)+7) print(s1)
import java.util.*; class Main { static int func(int s,int p,int n) { if(p==n-1) return 1; int ans=0; for(int i=s;i<=9;i++) ans += func(i,p+1,n); return ans; } public static void main (String[]args) { Scanner sc = new Scanner (System.in); int n = sc.nextInt (); int ans=0; for(int i=0; i<n; i++){ int a = sc.nextInt (); for(int j=0; j <=9; j++) ans+=func(j,0,a); } System.out.println (ans); } }
Question 5: Find the homeless
Problem Statement -: There are N Homeless people in the community and N houses in the community. It will be given in the array (people) , height of the person and in the array house capacity of the house is given.
Government decided to give homes for people on the basis of following conditions:
- Priority is given for the people from left to right of the array
- Each person is allotted to a house if and only if the capacity of house is greater than or equal to persons height
- Nearby empty Houses are alloted to the person( starting from extreme left)
You need to find the number of homeless people who have not allotted any home if the government follows the above conditions.So that government will have an idea for how many people they need to allot home for next time.
Constraints:
- 1 <= N <= 10^3
- 1 <= people[i] <= 10^5
- 1 <= house[i] <= 10^5
Input Format for Custom Testing:
- The first line contains an integer, N, denoting the number of people and number of houses.
- Each line i of the N subsequent lines (where 0 <= i <= N) contains an integer describing peoplei.
- Each line i of the N subsequent lines (where 0 <= i <= N) contains an integer describing housei.
Sample Test Cases
- Sample Input 1
3
4
2
7
3
5
10 - Sample Output 1
0 - Explanation
people=[4,2,7]
house=[3,5,10]
People[0] has more priority , from left to right order in houses 5 is the nearest one which fits for people[0]
people[1]=2 will fit in 3 which is nearer from left
people[2]=7 will fit in remaining house of capacity of 10
So no homeless people left so return 0
- Sample Input 2
3
3
8
5
1
9
4 - Sample Output 2
2 - Explanation
people=[3,8,5]
house=[1,9,4]
people[0]=3 can fit in 9 which is nearest from left in array house
people[1]=8 cannot fit in any home which is left (i.e, 1 and 4)
people[2]=5 cannot fit in any home which is left (i.e, 1 and 4)
So return 2,which is number of homeless people
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int people[n], house[n]; for(int i=0; i<n; i++) cin>>people[i]; for(int i=0; i<n; i++) cin>>house[i]; int count = 0; for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ if(people[i]<house[j]){ count+=1 ; house[j]=-1; break ; } } } cout<<n-count; }
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner (System.in); int n=sc.nextInt(); int people[]= new int[n]; int house[]= new int[n]; for(int i=0; i<n; i++) people[i]=sc.nextInt(); for(int i=0; i<n; i++) house[i]=sc.nextInt(); int count = 0; for(int i=0; i<n; i++){ for(int j=0; j<n; j++){ if(people[i]<house[j]){ count+=1 ; house[j]=-1; break ; } } } System.out.println(n-count); } }
N=int(input()) people=[] house=[] #to read data of people and house arrays for i in range(N): people.append(int(input())) for i in range(N): house.append(int(input())) count=0 for i in range(N): for j in range(N): if(people[i] < house[j]): count+=1 house[j]=-1 break print(N-count)
FAQs related to Casa Retail Coding Questions
Question 1: How many rounds are their in Casa Retail Recruitment Process?
After, 1st Round (i.e. Coding Assessments) 2 Rounds of Technical Interviews are conducted, and last is HR Interview.
Question 2: Is Coding questions asked in Casa Retail Hiring Process?
Yes, Coding Questions are included in Online Assessments as well as Both technical Interviews.
Get over 200+ course One Subscription
Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others
Login/Signup to comment