Althea.ai Coding Questions and Solutions
Althea Coding Questions with Solutions
On this page, you can access a collection of Althea.ai Coding Questions and Answers that are commonly used in online assessments and technical interviews during the recruitment process of the company. Additionally, you can find relevant information such as job profile, job location, offered CTC, and steps involved in the hiring process.
Please browse through this page to gain insights and prepare effectively for your upcoming interview with Althea.ai .
About Althea.ai
Althea.ai was established in 2019 .It is a healthcare technology company that aims to improve patient outcomes and reduce healthcare costs by leveraging artificial intelligence and machine learning. They offer an AI-powered platform that enables healthcare providers to make data-driven decisions, streamline operations, and improve patient engagement. Althea.ai’s platform uses predictive analytics to identify high-risk patients and recommend personalized interventions that can improve their health outcomes. The company is headquartered in San Francisco, California, and has a team of experts in healthcare, technology, and data science. Althea.ai is committed to using technology to transform healthcare and make it more accessible, affordable, and effective for everyone
About Althea.ai Recruitment Process
The Althea.ai Recruitment Process consists of the following steps :- Computer Based Test (CBT)
- Technical Interview
- HR Interview
- Internship Offer (3 months)
- Offer Permanent Employment
We have mentioned further details of the Althea.ai Recruitment Process in the following Tabular Form
Althea.ai | Related Information |
---|---|
Position : |
|
Course : |
|
Eligibility Criteria / Academic Qualification Required : |
|
CTC : |
|
Selection Process : |
|
Joining Location : | Sector 135, NOIDA. |
Perks : | Company sponsored Medical Insurance of 5 Lacs INR. |
Althea.ai Internship Details
Role Overview
- Althea.ai is seeking Interns/Freshers from Engineering background who are keen to work with us in the field of AI development.
- The internship period will be of three months and based on your performance you will be provided a permanent opportunity.
- Monthly stipend of 12,500 INR will be provided to the interns.
- Working Hours 9.00 AM to 6.30 PM, Monday to Friday.
- Students open for internship in Full-Stack Development on Next-Gen technologies - Python, Angular, Data Science, Block Chain, MySQL and MongoDB, NLP.
Prime Course Trailer
Related Banners
Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription
Althea.ai Coding Questions and Answers
Question 1 : Spiral Matrix
Problem Statement :
You will be given a 2d matrix. Write the code to traverse the matrix in a spiral format. Check the input and output for better understanding.
Sample Input :
Input :
5 4
1 2 3 4
5 6 7 8
9 10 11 12
13 14 15 16
17 18 19 20
Output :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
#include <bits/stdc++.h> using namespace std; void Spiral (vector < vector < int >>a) { if (a.size () == 0) return; int m = a.size (), n = a[0].size (); int i, k = 0, l = 0; while (k < m && l < n) { for (i = l; i < n; ++i) cout << a[k][i] << " "; k++; for (i = k; i < m; ++i) cout << a[i][n - 1] << " "; n--; if (k < m) { for (i = n - 1; i >= l; --i) cout << a[m - 1][i] << " "; m--; } if (l < n) { for (i = m - 1; i >= k; --i) cout << a[i][l] << " "; l++; } } } int main () { int r, c; cin >> r >> c; vector < vector < int >>mat (r, vector < int >(c)); for (int i = 0; i < r; i++) for (int j = 0; j < c; j++) cin >> mat[i][j]; Spiral (mat); }
import java.util.*; public class Main { public static List < Integer > solve(int [][]matrix,int row,int col) { List < Integer > res=new ArrayList < Integer > (); boolean[][] temp=new boolean[row][col]; int []arr1={0,1,0,-1}; int []arr2={1,0,-1,0}; int di=0,r=0,c=0; for(int i=0;i < row*col; i++) { res.add(matrix[r][c]); temp[r][c]=true; int count1=r+arr1[di]; int count2=c+arr2[di]; if(count1 >= 0 && row > count1 && count2 >= 0 && col > count2 && !temp[count1][count2]){ r=count1; c=count2; } else { di=(di+1)%4; r+=arr1[di]; c+=arr2[di]; } } return res; } public static void main(String[] args) { Scanner sc=new Scanner(System.in); int m=sc.nextInt(); int n=sc.nextInt(); int matrix[][]=new int[m][n]; for(int i=0;i < m;i++) { for(int j=0;j < n;j++) matrix[i][j]=sc.nextInt(); } System.out.println(solve(matrix,m,n)); } }
def spiralOrder(arr): ans = [] while arr: ans += arr.pop(0) arr = (list(zip(*arr)))[::-1] return ans arr = [] n, m = map(int, input().split()) for i in range(n): arr.append(list(map(int, input().split()))) print(*spiralOrder(arr))
Question 2 :New Number System
Problem Statement :
Here is about to introduce a new kind of number system. Where instead of 10 digits there is 20, from a to t, all in small. Now a means 1, b means 2 and t means 20, thenn aa means 21. Now for a new number you have to print the decimal form it.
Note that the letters in the input string will be lower case and from a to t.
Input Format:
Single line containing the string of new number system’s number
Output Format:
Single line denoting the integer with the same decimal value as the input string
Sample input 1: e
Sample Output: 5
Sample Input 2: ac
Sample Output: 23
#include<bits/stdc++.h> using namespace std; int func (string s, int n, int i) { if (n < 0) return 0; return (s[n] - 'a' + 1) * pow (20, i) + func (s, n - 1, i + 1); } int main () { string s; cin >> s; cout << func (s, s.length () - 1, 0); }
import java.util.*; class Main { public static int func (String s, int n, int i) { if (n < 0) return 0; return (s.charAt (n) - 'a' + 1) * (int) Math.pow (20, i) + func (s, n - 1, i + 1); } public static void main (String[]args) { Scanner sc = new Scanner (System.in); String str = sc.next (); System.out.println (func (str, str.length () - 1, 0)); } }
def solve(s,n,i): if(n < 0): return 0 return (ord(s[n])-ord('a')+1)*(20**i)+solve(s,n-1,i+1) s=input() n=len(s) print(solve(s,n-1,0))
Question 3 : Minimum Occurrence
Problem Statement :
Given a sting , return the character that appears the minimum number of times in the string. The string will contain only ascii characters, from the ranges (“a”-”z”,”A”-”Z”,0-9), and case matters . If there is a tie in the minimum number of times a character appears in the string return the character that appears first in the string.
Input Format:
Single line with no space denoting the input string.
Output Format:
Single character denoting the least frequent character.
Constraints:
Length of string <=10^6
Sample Input:
cdadcda
Sample Output:
c
Explanation:
C and A both are with minimum frequency. So c is the answer because it comes first with less index.
#include <bits/stdc++.h> using namespace std; unordered_map < char,int > F; int main() { string s; int m=INT_MAX; cin >> s; for(auto i:s) F[i]++; for(auto i:F) m=min(m,i.second); for(auto i:s) if(F[i]==m) { cout << i; break; } }
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); String str=sc.next(); char arr[]=str.toCharArray(); int temp[]=new int[256]; for(int i=0;i < arr.length;i++) { temp[arr[i]]++; } int min=Integer.MAX_VALUE; int index=0; for(int i=255;i >= 0;i--) { if(temp[i]==0) continue; min=Math.min(min,temp[i]); } for(int i=0;i < arr.length;i++) { if(min==temp[arr[i]]) { System.out.println(arr[i]); break; } } } }
s=input() ans=[] for i in s: ans.append(s.count(i)) print(s[ans.index(min(ans))])
Question 4 : Death Note
Problem Statement :
Ryuk, the Shinigami (God of death) had allowed Light Yagami, a school student, to kill as many people as he can by using a death note. But writing the names barely will allow other people to watch them. So he encrypts the names using digits, where a means 1, b means 2 and so on upto z is 26. Now if he gives numbers, there is a communication error because a number string can be decrypted by the death note in various ways and eventually killing them all. If everyone in the world has a unique name, for a given number, how many people can die?
NOTE THAT: There is every possible name in the world with the 26 letters, and capital or small letters is not a problem.
Input format:
A number stream denoting the first name’s encrypted version
Output Format:
Number of people dying by this.
Constraints:
1<=stream length<=10^8
Sample Input: 1267
Sample Output: 3
Output Specification:Two people of the name azg and lfg die.
#include <bits/stdc++.h> using namespace std; string s; int ans; void func(int i, int n) { if (i == n - 1 || i == n) { ans++; return; } if (s[i] == '1') func(i + 2, n); else if (s[i] == '2' && s[i + 1] < '7') func(i + 2, n); func(i + 1, n); } int main() { ans = 0; cin >> s; func(0, s.length()); cout << ans; }
import java.util.*; class Main { static String s; static int ans; public static void func(int i, int n) { if (i == n - 1 || i == n) { ans++; return; } if (s.charAt(i) == '1') func(i + 2, n); else if (s.charAt(i) == '2' && s.charAt(i + 1) < '7') func(i + 2, n); func(i + 1, n); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); s = sc.next(); func(0, s.length()); System.out.println(ans); } }
def solve(s, n): if n == 0 or n == 1: return 1 ans = 0 if s[n - 1] > "0": ans = solve(s, n - 1) if s[n - 2] == "1" or (s[n - 2] == "2" and s[n - 1] < "7"): ans += solve(s, n - 2) return ans s = input() print(solve(s, len(s)))
Question 5 : Capitalize/Decapitalize
Problem Statement :
You’re given a function that accepts the following, a string1, its length and a character c. Your job is to replace all the occurrences of character c in string1 and capitalize it or decapitalize it based on the character c.
Input :
hello world
l
Output :
heLLo worLd
Input :
prepinsta
p
Output :
PrePinsta
#include <bits/stdc++.h> using namespace std; int main() { string s; getline(cin, s); char k; cin >> k; for (auto i: s) if (i == k) { if (i > 95) cout << char(i - 32); else cout << char(i + 32); } else cout << i; }
import java.util.Scanner; public class Main { public static void change(String str, char c, int len) { char[] ch = str.toCharArray(); for (int i = 0; i < ch.length; i++) { if (c == ch[i]) { if (Character.isUpperCase(ch[i])) { ch[i] = Character.toLowerCase(ch[i]); } else if (Character.isLowerCase(ch[i])) { ch[i] = Character.toUpperCase(ch[i]); } } } System.out.print(new String(ch)); } public static void main(String[] args) { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); char c = sc.next().charAt(0); int len = str.length(); change(str, c, len); } }
def change(string, c, length): # Convert string to a list of characters chars = list(string) # Loop through each character in the list for i in range(length): if c == chars[i]: if chars[i].isupper(): chars[i] = chars[i].lower() elif chars[i].islower(): chars[i] = chars[i].upper() # Join the modified list of characters back into a string return ''.join(chars) # Main function def main(): string = input() c = input()[0] length = len(string) print(change(string, c, length)) if __name__ == '__main__': main()
FAQs related to Althea.ai Coding Questions
Question 1: How many rounds are there in Althea.ai Hiring Process?
There are in total five rounds in the Althea.ai Hiring Process which includes:-
- Computer Based Test (CBT)
- Technical Interview
- HR Interview
- Internship Offer (3 months)
- Offer Permanent Employment
Question 2: Is Coding questions asked in Althea.ai Recruitment Process?
Yes, Coding Questions are included in Online Assessment and Technical Interview of Altheai.ai.
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